From b9604c2e49dc836bb22e58a1af6137cd58bdaa73 Mon Sep 17 00:00:00 2001 From: Nikita Shubin Date: Wed, 13 May 2026 14:58:03 +0300 Subject: 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 --- Makefile | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 Makefile 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} -- cgit v1.2.3