Sorry but this is anything but simple to me.
I consider my own static site generator [1] much simpler than this. Around 250 SLOC with 4 dependencies (markdown2, pyyaml, jinja2, Pygments)
I consider my own static site generator [1] much simpler than this. Around 250 SLOC with 4 dependencies (markdown2, pyyaml, jinja2, Pygments)
for I in *.md; do pandoc "$I" --template=template.html --metadata title="My Site" -o "${I%.md}.html"; done CONTENT_DIR := content
BUILD_DIR := public
MD_FILES := $(shell find $(CONTENT_DIR) -name '*.md')
HTML_OUT := $(patsubst $(CONTENT_DIR)/%.md,$(BUILD_DIR)/%.html,$(MD_FILES))
.PHONY: all clean assets serve
all: $(HTML_OUT) assets
assets:
@mkdir -p $(BUILD_DIR) && cp -a static/style.css $(BUILD_DIR)/
$(BUILD_DIR)/%.html: $(CONTENT_DIR)/%.md templates/default.html site.yaml
@mkdir -p $(dir $@)
pandoc --standalone --from gfm --to html5 \
--template=templates/default.html \
--metadata-file=site.yaml \
--toc --toc-depth=3 \
-o $@ $<
Ask ChatGPT, it'll spit out the rest (sample posts, template, CSS, YAML, Makefile, etc)