diff options
| author | Nikita Shubin <nikita.shubin@maquefel.me> | 2026-05-13 14:58:03 +0300 |
|---|---|---|
| committer | Nikita Shubin <nikita.shubin@maquefel.me> | 2026-05-17 13:00:59 +0300 |
| commit | b9604c2e49dc836bb22e58a1af6137cd58bdaa73 (patch) | |
| tree | 3ea7a163f91e95bfac087c7a49af76b5d788f110 | |
| parent | b468d13f7f94ba3df35fee1f39ceb7a1fca10959 (diff) | |
| download | landau-suite-b9604c2e49dc836bb22e58a1af6137cd58bdaa73.tar.gz landau-suite-b9604c2e49dc836bb22e58a1af6137cd58bdaa73.zip | |
build: Add Makefile
Add Makefile to invoke hugo for building site i.e.:
```
$ make CONTENT=../landau
```
Following variables allowed:
HUGO - specify hugo binary
TEMPLATE - path to hugo template
CONTENT - path to directory with md files, i.e. content
DEPLOY - path where resulting files will be put
Signed-off-by: Nikita Shubin <nikita.shubin@maquefel.me>
| -rw-r--r-- | Makefile | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..3dc01dd --- /dev/null +++ b/Makefile @@ -0,0 +1,38 @@ +# TODO: help +export SHELL = /bin/bash + +-include config.mk + +ifndef HUGO +HUGO := hugo +endif + +ifndef TEMPLATE +TEMPLATE := ${CURDIR}/template +endif + +ifndef CONTENT +CONTENT := ${CURDIR}/landau +endif + +ifndef DEPLOY +DEPLOY := ${CURDIR}/public +endif + +all: \ + .build-site + +# --- Generate Site + +${DEPLOY}: + mkdir -p $@ + +.build-site: ${TEMPLATE} ${CONTENT} | ${DEPLOY} + (cd ${TEMPLATE} && \ + ${HUGO} -D -c ${CONTENT} -d ${DEPLOY} \ + --enableGitInfo --enableGitPurismInfo --gc) + +PHONY: .build-site + +dist-clean:: + rm -rf ${DEPLOY} |
