summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikita Shubin <nikita.shubin@maquefel.me>2026-05-13 14:58:03 +0300
committerNikita Shubin <nikita.shubin@maquefel.me>2026-05-17 13:00:59 +0300
commitb9604c2e49dc836bb22e58a1af6137cd58bdaa73 (patch)
tree3ea7a163f91e95bfac087c7a49af76b5d788f110
parentb468d13f7f94ba3df35fee1f39ceb7a1fca10959 (diff)
downloadlandau-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--Makefile38
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}