adjust section heading generation ; add news post about latest changes to the site

This commit is contained in:
KemoNine 2024-07-04 15:53:13 -04:00
parent 7e46f0ceb9
commit 307060cd88
5 changed files with 29 additions and 4 deletions

View file

@ -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

View file

@ -0,0 +1,3 @@
<a class="heading" href="#{{ .Anchor }}"><h{{ .Level }} id="{{ .Anchor }}">
{{- .Text | safeHTML -}}
</h{{ .Level }}></a>

View file

@ -6,7 +6,7 @@
{{ .Content }} {{ .Content }}
{{ if .Params.changelog }} {{ if .Params.changelog }}
<h2>Changelog</h2> <a class="heading" href="#changelog"><h2 id="changelog">Changelog</h2></a>
{{ if .Page.Params.toc }} {{ if .Page.Params.toc }}
<a class="back_to_top" href="#top">Back to ToC</a> <a class="back_to_top" href="#top">Back to ToC</a>
&nbsp;|&nbsp; &nbsp;|&nbsp;
@ -15,7 +15,7 @@
&nbsp;|&nbsp; &nbsp;|&nbsp;
{{ end }} {{ end }}
<a class="back_to_top" href="#page_menu">Back to page menu</a> <a class="back_to_top" href="#page_menu">Back to page menu</a>
<div id="Changelog"> <div class="changelog">
<dl> <dl>
{{ range .Params.changelog }} {{ range .Params.changelog }}
<dt><strong>{{ .date }}</strong></dt> <dt><strong>{{ .date }}</strong></dt>

View file

@ -20,7 +20,7 @@
{{ end }} {{ end }}
{{ if .Page.Params.changelog }} {{ if .Page.Params.changelog }}
&nbsp;|&nbsp;<a class="back_to_top" href="#Changelog">Jump to Changelog</a> &nbsp;|&nbsp;<a class="back_to_top" href="#changelog">Jump to Changelog</a>
{{ end }} {{ end }}
{{ range first 1 (where (where .Site.Pages ".Params.tags" "intersect" .Params.tags) "Permalink" "!=" .Permalink) }} {{ range first 1 (where (where .Site.Pages ".Params.tags" "intersect" .Params.tags) "Permalink" "!=" .Permalink) }}

View file

@ -19,6 +19,7 @@ body {
.title { font-size: 1.1em; } .title { font-size: 1.1em; }
.back_to_top { font-size: .85em } .back_to_top { font-size: .85em }
footer a { text-decoration: none; } footer a { text-decoration: none; }
a.heading { text-decoration: none; }
hr { hr {
border-style: dashed; border-style: dashed;
color: #ddd; color: #ddd;
@ -27,7 +28,7 @@ hr {
border: 1px solid #eee; border: 1px solid #eee;
border-radius: 5px; border-radius: 5px;
} }
#Changelog { div.changelog {
border: 1px solid #eee; border: 1px solid #eee;
border-radius: 5px; border-radius: 5px;
} }