From: Kyle Bowman Date: Mon, 30 Dec 2024 00:55:11 +0000 (-0500) Subject: feat: enable handwritten homepage X-Git-Url: https://git.rocketbowman.com/?a=commitdiff_plain;h=81c020b5d23b0e58dd42eba9d3e06e7a536cd771;p=jetsam.git feat: enable handwritten homepage --- diff --git a/Makefile b/Makefile index eb1a563..43779c7 100644 --- a/Makefile +++ b/Makefile @@ -20,14 +20,19 @@ help: @echo "rm-src Deletes symlinks in $(SRC_DIR), checking for non-link data." .PHONY: -all: build/index.html +all: $(BUILD_DIR)/all.html -build/index.html: .buildlist +$(BUILD_DIR)/all.html: .buildlist xargs -n 1 make --no-print-directory < .buildlist - scripts/index.sh > build/index.html + scripts/index.sh > build/all.html + +$(BUILD_DIR)/index.html: $(SRC_DIR)/index.md $(BUILD_DIR)/$(ASSETS_DIR) + @pandoc --defaults=./defaults/md-to-html-index.yml --output=$@ $< + @echo "Building $@ from $<..." .buildlist: @echo $(BUILD_LIST) | tr ' ' '\n' > .buildlist + @echo $(BUILD_DIR)/index.html >> .buildlist $(BUILD_DIR)/$(ASSETS_DIR): $(SRC_DIR)/$(ASSETS_DIR) mkdir -p $(BUILD_DIR)/$(ASSETS_DIR) diff --git a/defaults/md-to-html-index.yml b/defaults/md-to-html-index.yml new file mode 100644 index 0000000..ca840ee --- /dev/null +++ b/defaults/md-to-html-index.yml @@ -0,0 +1,8 @@ +from: markdown+wikilinks_title_before_pipe +to: html5 +filters: + - ${.}/../filters/links-to-html.lua +standalone: True +css: + - ./assets/css/normalize.css + - ./assets/css/space-sakura.css diff --git a/demo/index.md b/demo/index.md new file mode 100644 index 0000000..0a6cd74 --- /dev/null +++ b/demo/index.md @@ -0,0 +1,9 @@ +--- +title: Index +created: 20241229194426 +last_updated: 20241229194426 +--- + +This is where you would write a home page. + +Here is a link to [all the pages in this demo](./all.html). \ No newline at end of file diff --git a/scripts/index.sh b/scripts/index.sh index f2a4bd4..fc0f2e2 100755 --- a/scripts/index.sh +++ b/scripts/index.sh @@ -67,5 +67,5 @@ make_boilerplate(){ ######## # MAIN # ######## -FILES="$(find "$BUILD_DIR" -type 'f' -and -name '*.html' -not -name "*index.html" | sort)" +FILES="$(find "$BUILD_DIR" -type 'f' -and -name '*.html' -not -name "*all.html" | sort)" make_boilerplate "$(make_ul "$FILES")"