From 307060cd88d7577573f1a7f3f9535d87b9dd0cd2 Mon Sep 17 00:00:00 2001 From: KemoNine Date: Thu, 4 Jul 2024 15:53:13 -0400 Subject: [PATCH] adjust section heading generation ; add news post about latest changes to the site --- content/posts/2024-07-04-updates.md | 21 +++++++++++++++++++ .../_default/_markup/render-heading.html | 3 +++ themes/hugo-xmin/layouts/_default/single.html | 4 ++-- .../hugo-xmin/layouts/partials/page_meta.html | 2 +- themes/hugo-xmin/static/css/style.css | 3 ++- 5 files changed, 29 insertions(+), 4 deletions(-) create mode 100644 content/posts/2024-07-04-updates.md create mode 100644 themes/hugo-xmin/layouts/_default/_markup/render-heading.html diff --git a/content/posts/2024-07-04-updates.md b/content/posts/2024-07-04-updates.md new file mode 100644 index 0000000..ee4de7e --- /dev/null +++ b/content/posts/2024-07-04-updates.md @@ -0,0 +1,21 @@ +--- +layout: post +title: Misc Updates +author: + - KemoNine +publishDate: 2024-07-04 +lastMod: 2024-07-04 +toc: false +draft: false +categories: + - blog +--- + +The site has been refined a bit: + +- Headings are now link anchors to allow easier sharing of section links +- Moved the `Changelog` section to the bottom of each page to facilitate 'getting straight to the content' +- A link to jump to the Changelog section has been added to the header block of each page +- Moved `Changelog` setup to each page's front matter to make it easier to manage and ensure consistency across the site +- Removed `Static CMS` +- Updated `Decap` to prepare for later use diff --git a/themes/hugo-xmin/layouts/_default/_markup/render-heading.html b/themes/hugo-xmin/layouts/_default/_markup/render-heading.html new file mode 100644 index 0000000..1ede3e0 --- /dev/null +++ b/themes/hugo-xmin/layouts/_default/_markup/render-heading.html @@ -0,0 +1,3 @@ + + {{- .Text | safeHTML -}} + diff --git a/themes/hugo-xmin/layouts/_default/single.html b/themes/hugo-xmin/layouts/_default/single.html index 57c139a..dffb2cb 100644 --- a/themes/hugo-xmin/layouts/_default/single.html +++ b/themes/hugo-xmin/layouts/_default/single.html @@ -6,7 +6,7 @@ {{ .Content }} {{ if .Params.changelog }} -

Changelog

+

Changelog

{{ if .Page.Params.toc }} Back to ToC  |  @@ -15,7 +15,7 @@  |  {{ end }} Back to page menu -
+
{{ range .Params.changelog }}
{{ .date }}
diff --git a/themes/hugo-xmin/layouts/partials/page_meta.html b/themes/hugo-xmin/layouts/partials/page_meta.html index ab58802..4649d0a 100644 --- a/themes/hugo-xmin/layouts/partials/page_meta.html +++ b/themes/hugo-xmin/layouts/partials/page_meta.html @@ -20,7 +20,7 @@ {{ end }} {{ if .Page.Params.changelog }} -  | Jump to Changelog +  | Jump to Changelog {{ end }} {{ range first 1 (where (where .Site.Pages ".Params.tags" "intersect" .Params.tags) "Permalink" "!=" .Permalink) }} diff --git a/themes/hugo-xmin/static/css/style.css b/themes/hugo-xmin/static/css/style.css index 9edcdf5..810b6a8 100644 --- a/themes/hugo-xmin/static/css/style.css +++ b/themes/hugo-xmin/static/css/style.css @@ -19,6 +19,7 @@ body { .title { font-size: 1.1em; } .back_to_top { font-size: .85em } footer a { text-decoration: none; } +a.heading { text-decoration: none; } hr { border-style: dashed; color: #ddd; @@ -27,7 +28,7 @@ hr { border: 1px solid #eee; border-radius: 5px; } -#Changelog { +div.changelog { border: 1px solid #eee; border-radius: 5px; }