This commit is contained in:
Never Gude 2026-02-21 02:07:03 +01:00
parent cf93279141
commit 6096df6978
21 changed files with 201 additions and 165 deletions

View file

@ -9,6 +9,7 @@ INSTALLDIR_ANSI := public_ansi/
ARTICLEDIR := articles
PANDOCDIR := pandoc
STYLEDIR := styles
SCRIPTDIR := scripts
IMAGEDIR := images
# The name of the stylesheet. This needs to be copied to any directory containing html files that use it.
@ -37,7 +38,7 @@ articles_ansi := $(patsubst $(SRCDIR)/%.md, $(BUILDDIR)/%, $(articles_md))
all: $(BUILDDIR)/index.html $(BUILDDIR)/index $(BUILDDIR)/rss.xml
install:
cp -r $(BUILDDIR)/index.html $(BUILDDIR)/rss.xml $(articles_html) $(STYLEDIR) $(IMAGEDIR) $(INSTALLDIR_HTML); \
cp -r $(BUILDDIR)/index.html $(BUILDDIR)/rss.xml $(articles_html) $(STYLEDIR) $(SCRIPTDIR) $(IMAGEDIR) $(INSTALLDIR_HTML); \
cp -r $(BUILDDIR)/index $(articles_ansi) $(INSTALLDIR_ANSI);
clean:
@ -66,7 +67,7 @@ $(BUILDDIR)/index.html: $(SRCDIR)/index.md $(articles_html) | $(BUILDDIR)
jq '.articles |= sort_by(.date) | .articles |= reverse' ${article_list} > articles.json.tmp; \
mv articles.json.tmp ${article_list}; \
# Build index.html with metadata injected from articles_list
pandoc $< --template $(template_html) --include-after-body $(shark_js) --css $(style) --metadata-file $(article_list) --highlight-style $(syntax_style) --mathml --toc --output $@;
pandoc $< --template $(template_html) --css $(style) --metadata-file $(article_list) --highlight-style $(syntax_style) --mathml --toc --output $@;
$(BUILDDIR)/index: $(SRCDIR)/index.md $(articles_ansi) | $(BUILDDIR)
pandoc $< --template $(template_ansi) --metadata-file $(article_list) --to ansi --output $@