From b1e24389ea11d1b22f721702d7daea75f3cacc54 Mon Sep 17 00:00:00 2001 From: hannahilea Date: Mon, 4 Nov 2024 13:02:06 -0500 Subject: [PATCH] update blog index sorting --- .vscode/settings.json | 4 + blog/__template/index.template.html | 14 +- blog/index.html | 251 ++++++++++++++-------------- blog/table-niceties.js | 5 - build-blogs/run.jl | 7 +- 5 files changed, 149 insertions(+), 132 deletions(-) delete mode 100644 blog/table-niceties.js diff --git a/.vscode/settings.json b/.vscode/settings.json index ab53494..be8dba9 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -15,6 +15,10 @@ "match": "blog/__template/.*$", "cmd": "echo 'A __template file has been saved ${file}.'; julia build-blogs/run.jl" }, + { + "match": "build-blogs/.*$", + "cmd": "echo 'A file in `build-blogs` has been saved ${file}.'; julia build-blogs/run.jl" + }, ] } } diff --git a/blog/__template/index.template.html b/blog/__template/index.template.html index 36c5222..e30d92d 100644 --- a/blog/__template/index.template.html +++ b/blog/__template/index.template.html @@ -28,8 +28,9 @@

Blog

- - + + + @@ -38,7 +39,14 @@

Blog

DateTitleDateTitle
- + +
diff --git a/blog/index.html b/blog/index.html index 9169ff4..37f8f66 100644 --- a/blog/index.html +++ b/blog/index.html @@ -1,132 +1,139 @@ - + - - - - - - - - - @hannahilea: blog - + + + + + + + + - -
- -

Blog

+ @hannahilea: blog + -
- - - - - - - - - - - - - - + +
+ +

Blog

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +
+
DateTitle
31 Oct 2024 - Scurrying seagull: CAD-assisted Fliposcope animation - -
18 Oct 2024 - Clapping Music for one flip-disc display: Byte and variations - -
11 Oct 2024 - Quick ’n hacky meme making, for fun and no profit - -
27 Sep 2024 - Obsessed with Cuttle: Parametric CAD for prototyping, producing, and procrastinating - -
21 Sep 2024 - First things first: Make a list - -
20 Sep 2024 - Dopamine-driven development (DDD), spite-driven development (SDD), and other DDs - -
18 Sep 2024 - Titles of blog posts I might never write - -
14 Sep 2024 - Clapping Music for two flip-disc displays - -
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
DateTitle
31 Oct 2024Scurrying seagull: CAD-assisted Fliposcope animation + +
18 Oct 2024Clapping Music for one flip-disc display: Byte and variations + +
11 Oct 2024Quick ’n hacky meme making, for fun and no profit + +
27 Sep 2024Obsessed with Cuttle: Parametric CAD for prototyping, producing, and procrastinating + +
21 Sep 2024First things first: Make a list + +
20 Sep 2024Dopamine-driven development (DDD), spite-driven development (SDD), and other DDs + +
18 Sep 2024Titles of blog posts I might never write + +
14 Sep 2024Clapping Music for two flip-disc displays + +
17 May 2024This website’s structure: A meta post + +
+
+ + + var blogList = new List('post-list', options); + -
- - - Subscribe to @hannahilea RSS feed -
+
+ + + Subscribe to @hannahilea RSS feed
- +
+ + diff --git a/blog/table-niceties.js b/blog/table-niceties.js deleted file mode 100644 index da2c231..0000000 --- a/blog/table-niceties.js +++ /dev/null @@ -1,5 +0,0 @@ -var options = { - valueNames: ['date', 'title', 'tags'] - }; - -var blogList = new List('post-list', options); diff --git a/build-blogs/run.jl b/build-blogs/run.jl index d041162..1612b50 100644 --- a/build-blogs/run.jl +++ b/build-blogs/run.jl @@ -128,13 +128,16 @@ function generate_blog_index(; overwrite_existing=false, template=blog_index_tem end metadata = sort(metadata; by=(m) -> m.date_str, rev=true) + # See blog/__template/index.template.html for how this + # fits into table blog_strs = map(metadata) do m date_pretty = Dates.format(Date(m.date_str), dateformat"d u yyyy") tags = replace(m.tags, "," => ", ") return """ - $(date_pretty) - $(m.date_str) + $(date_pretty) + $(m.date_str) + $(m.title) $(m.title)