From 85e59a6e29feba747d57287aee20df8ba5c54626 Mon Sep 17 00:00:00 2001
From: Jim Shepich III
Date: Mon, 9 Feb 2026 17:52:35 -0500
Subject: [PATCH] Codehilite disclaimer
---
config.yaml | 3 ++-
jimsite/articles.py | 2 ++
site/assets/css/theme.css | 9 +++++++++
.../templates/components/jimoire-article.html | 20 -------------------
.../templates/components/jimoire_article.html | 11 ++++++++++
5 files changed, 24 insertions(+), 21 deletions(-)
delete mode 100644 site/templates/components/jimoire-article.html
create mode 100644 site/templates/components/jimoire_article.html
diff --git a/config.yaml b/config.yaml
index 19dc521..6e43060 100644
--- a/config.yaml
+++ b/config.yaml
@@ -58,5 +58,6 @@ sites:
- '*.md'
- 'essentials/*.md'
- '**/*.md'
- # TODO: add newsletter
+ template_selections:
+ article: templates.components.jimoire_article
\ No newline at end of file
diff --git a/jimsite/articles.py b/jimsite/articles.py
index 816752f..a306df4 100644
--- a/jimsite/articles.py
+++ b/jimsite/articles.py
@@ -142,6 +142,8 @@ def build_articles(
# Sort the articles in order of ascending date.
sorted_articles = sorted([*index.values()], key = lambda a: a.metadata.date)
+ # TODO: add support for a metadata-based serial number or next/previous article link, instead of assuming date-based series ordering.
+
# Include the previous and next articles (if available) in the iteration
# in case the article template wants to link to them.
for previous_article, article, next_article in zip(
diff --git a/site/assets/css/theme.css b/site/assets/css/theme.css
index 2ce4a91..7b8e0a2 100644
--- a/site/assets/css/theme.css
+++ b/site/assets/css/theme.css
@@ -305,3 +305,12 @@ pre:has(> code), mark{
font-display: swap;
background-color: #d8d8d8;
}
+
+.codehilite-disclaimer{
+ font-size: 0.85em;
+}
+
+/* Hide codehilite disclaimer when there are no fenced code blocks. */
+article:not(:has(.codehilite)) .codehilite-disclaimer{
+ display: none;
+}
\ No newline at end of file
diff --git a/site/templates/components/jimoire-article.html b/site/templates/components/jimoire-article.html
deleted file mode 100644
index 304110d..0000000
--- a/site/templates/components/jimoire-article.html
+++ /dev/null
@@ -1,20 +0,0 @@
-
- First published:
- {article.metadata.date}
- · Last modified:
- {article.metadata.lastmod}
-
- {article.metadata.title}
-
-
By Jim Shepich III
-
- {article.content}
-
-
-
- < Previous
-
- Next >
-
- Tags: {blog_tags}{templates.components.rss_icon}
-
\ No newline at end of file
diff --git a/site/templates/components/jimoire_article.html b/site/templates/components/jimoire_article.html
new file mode 100644
index 0000000..4841d21
--- /dev/null
+++ b/site/templates/components/jimoire_article.html
@@ -0,0 +1,11 @@
+
+ First published:
+ {article.metadata.date}
+ · Last modified:
+ {article.metadata.lastmod}
+
+ {article.metadata.title}
+ {article.content}
+
+ Syntax highlighting stylesheet generated using Pygments
+
\ No newline at end of file