From 471b72c23e0e8a6f13230476878dfa482be6c2c5 Mon Sep 17 00:00:00 2001 From: Michael Thomson Date: Fri, 13 Sep 2024 11:01:18 -0700 Subject: [PATCH] gen --- content/blog/first-post.md | 15 +++++++++++++++ content/index.md | 3 +++ gen.sh | 2 +- public/blog/first-post.html | 28 ++++++++++++++++++++++++++++ public/first-post.html | 20 -------------------- public/index.html | 8 ++++++-- templates/page.html | 4 +--- 7 files changed, 54 insertions(+), 26 deletions(-) create mode 100644 public/blog/first-post.html delete mode 100644 public/first-post.html diff --git a/content/blog/first-post.md b/content/blog/first-post.md index e69de29..5350624 100644 --- a/content/blog/first-post.md +++ b/content/blog/first-post.md @@ -0,0 +1,15 @@ +--- +title: First Post +--- + +This is my first post + +Here's some code! + +```c +int main() +{ + printf("Hello, World!"); + return 0; +} +``` diff --git a/content/index.md b/content/index.md index bd9633a..942bd73 100644 --- a/content/index.md +++ b/content/index.md @@ -2,4 +2,7 @@ title: Michael Thomson --- +Welcome to my site! not much here yet. +## Recent blog posts +- [First Blog Post](/blog/first-post) diff --git a/gen.sh b/gen.sh index bf763de..a74b57c 100755 --- a/gen.sh +++ b/gen.sh @@ -1,4 +1,4 @@ #!/bin/bash cd content find . -type d -exec mkdir -p ../public/{} \; -find ./ -iname "*.md" -type f -exec sh -c 'pandoc "${0}" -f markdown -t html5 --template ../templates/page.html --css index.css -o "../public/$(basename ${0%.md}.html)"' {} \; +find ./ -iname "*.md" -type f -exec sh -c 'pandoc "${0}" -f markdown -t html5 --template ../templates/page.html --css index.css -o "../public/${0%.md}.html"' {} \; diff --git a/public/blog/first-post.html b/public/blog/first-post.html new file mode 100644 index 0000000..18d6557 --- /dev/null +++ b/public/blog/first-post.html @@ -0,0 +1,28 @@ + + + + + + + + First Post + + + + +

First Post

+

This is my first post

+

Here’s some code!

+
int main()
+{
+    printf("Hello, World!");
+    return 0;
+}
+ + diff --git a/public/first-post.html b/public/first-post.html deleted file mode 100644 index 7c42339..0000000 --- a/public/first-post.html +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - first-post - - - - - - - diff --git a/public/index.html b/public/index.html index 1431658..3e9674f 100644 --- a/public/index.html +++ b/public/index.html @@ -6,7 +6,7 @@ Michael Thomson - +

Michael Thomson

- +

Welcome to my site! not much here yet.

+

Recent blog posts

+ diff --git a/templates/page.html b/templates/page.html index e7daef1..dd7e5fd 100644 --- a/templates/page.html +++ b/templates/page.html @@ -12,9 +12,7 @@ $if(date-meta)$ $endif$ $pagetitle$ -$for(css)$ - -$endfor$ +