]> git.rocketbowman.com Git - jetsam.git/commitdiff
feat: enable handwritten homepage
authorKyle Bowman <kyle+github@rocketbowman.com>
Mon, 30 Dec 2024 00:55:11 +0000 (19:55 -0500)
committerKyle Bowman <kyle+github@rocketbowman.com>
Mon, 30 Dec 2024 00:55:11 +0000 (19:55 -0500)
Makefile
defaults/md-to-html-index.yml [new file with mode: 0644]
demo/index.md [new file with mode: 0644]
scripts/index.sh

index eb1a563d58f3d9aa2529277d59ca1e516e51e388..43779c71c14fbe3c824e13b98ca3a85e3884d9cf 100644 (file)
--- 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 (file)
index 0000000..ca840ee
--- /dev/null
@@ -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 (file)
index 0000000..0a6cd74
--- /dev/null
@@ -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
index f2a4bd4b633b7332eed54fb12769e27c1be1c5bf..fc0f2e28ff24415bd8c4f3a659b3b018ae4d6a3c 100755 (executable)
@@ -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")"