|
|
|
|
|
by 0xbadcafebee
293 days ago
|
|
Came here to post this too. Pandoc and a few lines of shell, all you need. Here is a super fancy Makefile: 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) |
|