diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..418eae1 --- /dev/null +++ b/Makefile @@ -0,0 +1,43 @@ +SHELL = /bin/sh +INSTALLDIR := ./public_html/eh/eh/eh/eh-eh/ + +# The name of the stylesheet. This needs to be copied to any directory containing html files that use it. +style := style.css +images := images + +# Main html template that pandoc uses to generate .html from .md files +template := pandoc/template.html + +# Template for extracting metadata of .md files in json format +list_template := pandoc/meta-json-template.txt + +# List of articles with their metadata to be used in the creation of the article list in index.html +article_list := articles.json + +# article targets +articles := $(patsubst %.md,%.html,$(wildcard articles/*.md)) + +all: clean index.html about.html + +install: + cp -r index.html about.html $(articles) $(style) $(images) $(INSTALLDIR); \ + +clean: + echo '{"articles": []}' > $(article_list); \ + rm index.html about.html $(articles); + +$(articles): %.html: %.md + # Build articles using pandoc + pandoc $< --template $(template) --css $(style) --highlight-style zenburn --mathml --toc --output $@; \ + + # Extract metadata from .md file, append filename field to the article object. + # This is used to link to the article from index.html. Append article object to the article list. + jq '.articles += [$(shell pandoc $< --template $(list_template) | jq '. += {"filename": "$(notdir $@)"}' )]' $(article_list) > articles.json.tmp; \ + mv ./articles.json.tmp $(article_list); \ + +index.html: index.md $(articles) + # Build index.html with metadata injected from articles_list + pandoc $< --template $(template) --css $(style) --metadata-file $(article_list) --highlight-style zenburn --mathml --toc --output $@; \ + +about.html: about.md + pandoc $< --template $(template) --css $(style) --highlight-style zenburn --mathml --toc --output $@ diff --git a/about.html b/about.html new file mode 100644 index 0000000..58eca52 --- /dev/null +++ b/about.html @@ -0,0 +1,66 @@ + + +
+ + + +Just testimg
+Neat things I picked up along the way
-10.12.2025
+25.7.2025