From 520f1f510c5a6acfbdbbec6e6c092fd2bde6b44d Mon Sep 17 00:00:00 2001 From: Richard Qin Date: Sun, 27 Sep 2026 01:50:31 +0800 Subject: Add journal year and month indexes --- content/journal/2026/07/_index.md | 9 +++++++++ content/journal/2026/08/_index.md | 9 +++++++++ content/journal/2026/09/_index.md | 9 +++++++++ content/journal/2026/_index.md | 9 +++++++++ layouts/journal/list.html | 34 ++++++++++++++++++++++++---------- scripts/publish-raw | 5 ++++- 6 files changed, 64 insertions(+), 11 deletions(-) create mode 100644 content/journal/2026/07/_index.md create mode 100644 content/journal/2026/08/_index.md create mode 100644 content/journal/2026/09/_index.md create mode 100644 content/journal/2026/_index.md diff --git a/content/journal/2026/07/_index.md b/content/journal/2026/07/_index.md new file mode 100644 index 0000000..1b29568 --- /dev/null +++ b/content/journal/2026/07/_index.md @@ -0,0 +1,9 @@ +--- +title: "July 2026" +lang: en +url: "/journal/2026/07/" +description: "Journal entries from July 2026." +license: CC-BY-SA-4.0 +--- + +Journal entries published in July 2026. diff --git a/content/journal/2026/08/_index.md b/content/journal/2026/08/_index.md new file mode 100644 index 0000000..415de46 --- /dev/null +++ b/content/journal/2026/08/_index.md @@ -0,0 +1,9 @@ +--- +title: "August 2026" +lang: en +url: "/journal/2026/08/" +description: "Journal entries from August 2026." +license: CC-BY-SA-4.0 +--- + +Journal entries published in August 2026. diff --git a/content/journal/2026/09/_index.md b/content/journal/2026/09/_index.md new file mode 100644 index 0000000..be6fa08 --- /dev/null +++ b/content/journal/2026/09/_index.md @@ -0,0 +1,9 @@ +--- +title: "September 2026" +lang: en +url: "/journal/2026/09/" +description: "Journal entries from September 2026." +license: CC-BY-SA-4.0 +--- + +Journal entries published in September 2026. diff --git a/content/journal/2026/_index.md b/content/journal/2026/_index.md new file mode 100644 index 0000000..d9bb59e --- /dev/null +++ b/content/journal/2026/_index.md @@ -0,0 +1,9 @@ +--- +title: "2026" +lang: en +url: "/journal/2026/" +description: "Journal entries from 2026." +license: CC-BY-SA-4.0 +--- + +Journal entries published in 2026. diff --git a/layouts/journal/list.html b/layouts/journal/list.html index dd486ac..4d74990 100644 --- a/layouts/journal/list.html +++ b/layouts/journal/list.html @@ -5,15 +5,29 @@ {{ partial "document-view.html" . }} {{ .Content }} - {{- $pages := where site.RegularPages "Section" "journal" -}} - {{- $pages = $pages.ByDate.Reverse -}} -
    - {{- range $pages }} -
  1. - - {{ .LinkTitle }} -
  2. - {{- end }} -
+ {{- $sections := sort .Sections "RelPermalink" "desc" -}} + {{- with $sections }} +
+

{{ if $.Parent.IsHome }}YEARS{{ else }}MONTHS{{ end }}

+ +
+ {{- end }} + {{- with .RegularPagesRecursive.ByDate.Reverse }} +
+

ENTRIES

+
    + {{- range . }} +
  1. + + {{ .LinkTitle }} +
  2. + {{- end }} +
+
+ {{- end }} {{ end }} diff --git a/scripts/publish-raw b/scripts/publish-raw index 4bcdbe9..cc05958 100755 --- a/scripts/publish-raw +++ b/scripts/publish-raw @@ -20,11 +20,14 @@ do journal/_index.md) target=$public_dir/journal/_index.md ;; + journal/*/_index.md|journal/*/*/_index.md) + target=$public_dir/$relative + ;; journal/*/*/*/*) target=$public_dir/$relative ;; journal/*) - # The V1 model has no public year or month section documents. + # Only source files for published journal sections and entries are public. continue ;; *) -- cgit v1.2.3