diff --git a/CLAUDE.md b/CLAUDE.md index 23e9b2d..f8ca744 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -43,6 +43,9 @@ Posts declare AI involvement level in front matter (e.g. `aiCode: T1/C2`). Rende ### Nested tags Categories use Obsidian-style path notation (`lang/de`, `tech/programming`). The `nestedSlugify()` function in `eleventy.config.js` preserves `/` separators during slug generation. Slugification is applied per segment. +### Changelog +`changelog.njk` — public page at `/changelog/` showing development activity. Uses Alpine.js to fetch commits from the IndieKit server's GitHub endpoint (`/github/api/changelog`). Commits are categorised by commit-message prefix (`feat:` → Features, `fix:` → Fixes, `perf:` → Performance, `a11y:` → Accessibility, `docs:` → Docs, everything else → Other). The server-side categorisation is applied by the postinstall patch `patch-endpoint-github-changelog-categories.mjs` in `indiekit-blog`. Tabs, labels, and colours in `changelog.njk` must stay in sync with that patch. + ### Unfurl shortcode `{% unfurl url %}` generates a rich link preview card with caching. Cache lives in `.cache/unfurl/`. The shortcode is registered from `lib/unfurl-shortcode.js`. @@ -131,4 +134,5 @@ BLUESKY_HANDLE svemagie - **Webmention self-filter** — own Bluesky account filtered from interactions - **Markdown Agents** — clean Markdown served to AI crawlers - **Mermaid diagrams** — `eleventy-plugin-mermaid` integrated +- **Changelog page** — commit-type tabs (feat/fix/perf/a11y/docs) via IndieKit GitHub endpoint - **Upstream drift check script** — `scripts/check-upstream-widget-drift.mjs` diff --git a/_includes/layouts/post.njk b/_includes/layouts/post.njk index 7efbcbd..d10b373 100644 --- a/_includes/layouts/post.njk +++ b/_includes/layouts/post.njk @@ -80,9 +80,22 @@ withBlogSidebar: true {% set isInteraction = replyTo or likedUrl or repostedUrl or bookmarkedUrl %} {% set hasContent = content and content | striptags | trim %} + {% set contentWarning = contentWarning or content_warning %} + {% if contentWarning %} +
+ + ⚠ {{ contentWarning }} + (click to show) + +
+ {{ content | safe }} +
+
+ {% else %}
{{ content | safe }}
+ {% endif %} {# Rich reply context with h-cite microformat #} {% include "components/reply-context.njk" %} diff --git a/blog.njk b/blog.njk index c8fb36e..594ec6f 100644 --- a/blog.njk +++ b/blog.njk @@ -37,6 +37,7 @@ permalink: "blog/{% if pagination.pageNumber > 0 %}page/{{ pagination.pageNumber {% set repostedUrl = post.data.repostOf or post.data.repost_of %} {% set replyToUrl = post.data.inReplyTo or post.data.in_reply_to %} {% set hasPhotos = post.data.photo and post.data.photo.length %} + {% set postCW = post.data.contentWarning or post.data.content_warning %} {% set borderClass = "" %} {% if likedUrl %} {% set borderClass = "border-l-[3px] border-l-red-400 dark:border-l-red-500" %} @@ -86,7 +87,9 @@ permalink: "blog/{% if pagination.pageNumber > 0 %}page/{{ pagination.pageNumber {{ likedUrl }} - {% if post.templateContent %} + {% if postCW %} +

⚠ {{ postCW }} — View post

+ {% elif post.templateContent %}
{{ post.templateContent | safe }}
@@ -131,7 +134,9 @@ permalink: "blog/{% if pagination.pageNumber > 0 %}page/{{ pagination.pageNumber {{ bookmarkedUrl }} - {% if post.templateContent %} + {% if postCW %} +

⚠ {{ postCW }} — View post

+ {% elif post.templateContent %}
{{ post.templateContent | safe }}
@@ -171,7 +176,9 @@ permalink: "blog/{% if pagination.pageNumber > 0 %}page/{{ pagination.pageNumber {{ repostedUrl }} - {% if post.templateContent %} + {% if postCW %} +

⚠ {{ postCW }} — View post

+ {% elif post.templateContent %}
{{ post.templateContent | safe }}
@@ -211,9 +218,13 @@ permalink: "blog/{% if pagination.pageNumber > 0 %}page/{{ pagination.pageNumber {{ replyToUrl }} + {% if postCW %} +

⚠ {{ postCW }} — View post

+ {% else %}
{{ post.templateContent | safe }}
+ {% endif %} Permalink @@ -246,6 +257,9 @@ permalink: "blog/{% if pagination.pageNumber > 0 %}page/{{ pagination.pageNumber {% endif %} {% include "components/garden-badge.njk" %} + {% if postCW %} +

⚠ {{ postCW }} — View post

+ {% else %} - {% if post.templateContent %} + {% endif %} + {% if not postCW and post.templateContent %}
{{ post.templateContent | safe }}
@@ -292,12 +307,16 @@ permalink: "blog/{% if pagination.pageNumber > 0 %}page/{{ pagination.pageNumber {% include "components/garden-badge.njk" %} + {% if postCW %} +

⚠ {{ postCW }} — View post

+ {% else %}

{{ post.templateContent | striptags | truncate(250) }}

Read more → + {% endif %} {% else %} {# ── Note card (unchanged) ── #} @@ -320,9 +339,13 @@ permalink: "blog/{% if pagination.pageNumber > 0 %}page/{{ pagination.pageNumber {% endif %} {% include "components/garden-badge.njk" %} + {% if postCW %} +

⚠ {{ postCW }} — View post

+ {% else %}
{{ post.templateContent | safe }}
+ {% endif %}
Permalink diff --git a/eleventy.config.js b/eleventy.config.js index 860fbb8..5da6dd5 100644 --- a/eleventy.config.js +++ b/eleventy.config.js @@ -1028,7 +1028,7 @@ export default function (eleventyConfig) { }); // Helper: exclude drafts from collections - const isPublished = (item) => !item.data.draft; + const isPublished = (item) => !item.data.draft && !item.data.deleted; // Helper: exclude unlisted/private visibility from public listing surfaces const isListed = (item) => {