Pages whose filename matches a nav section-id now get a clean pathname
URL (e.g. /timesheet) instead of the hash-based /#pages/timesheet.md.
- _initialPathname captured at IIFE start; handles ?_route= from 404.html
- basePath determined by initBasePath() after nav data loads; subpath
deployments (e.g. /mysite/) handled automatically
- navigateTo() uses replaceState to /slug for section-id pages and falls
back to #hash for everything else
- popstate listener handles browser history if a clean URL was the entry
- resolveSlugToFile() validates that slug is both a section code and has
a pages/{slug}.md entry in navData
- app/404.html added for GitHub Pages SPA routing
https://claude.ai/code/session_01Ai8xRvmrzdhuTKiRQ2fnn9
Adds an ubuntu-24.04-arm matrix entry so each release produces
mdcms-linux-arm64 and a matching arm64 .deb alongside the existing
amd64 artefacts. Fixes the fpm binary path and .deb artifact name to
be matrix-driven so both Linux builds are independent.
https://claude.ai/code/session_01LScjwzJJgLKsNrqEPLxJS8
Documents all four block types (tab-underline, tab-filled,
accordion-underline, accordion-filled and their aliases) with
per-item key tables and worked examples, in the same style as
the existing callout/toc/posts-* sections.
https://claude.ai/code/session_01SFMh7PDxJjvvo5dYbCCFFs
Implements four new mdcms fenced-block types:
tab-underline / tab, tab-filled,
accordion-underline / accordion, accordion-filled
Each block reads items: from a YAML body. Tab state and accordion
open/close are managed with aria-selected / aria-expanded and
data-open attributes. Markdown content inside each item is rendered
with the same pipeline as the surrounding page.
Adds computeDerivedTokens() — called on every applyTheme() — which
computes --mdcms-bar, --mdcms-filled-bg/border/fg, --mdcms-strip-border
from the active palette. Uses HSL chroma (S × (1-|2L-1|)) instead of raw
HSL S for the bold-nav heuristic, avoiding a false-positive on near-white
nav colours like the default #F8FAFC.
Adds app/pages/tabs-accordions.md as a visual test page and
docs/unreleased.md to track this change ahead of the next release.
https://claude.ai/code/session_01SFMh7PDxJjvvo5dYbCCFFs
Two bugs fixed in navigateTo:
1. When a category has visibilityifnocontent: hidden (default) and the
current page has no variant for it, the renderer now silently switches
to the default category before fetching. Previously the category stayed
active (kept visible in the selector via the activeCategory guard),
the fetch failed, and an error page was shown.
2. The offline message stored in localStorage was shown for any failed
fetch, not just genuine offline situations. Now gated on !navigator.onLine
so missing pages always show pagenotfoundmessage instead.
When set to visible, the category always appears in the selector
even when no variant exists for the current page. Navigating to
such a page shows pagenotfoundmessage with no fallback to
default-category content. Default behaviour (hidden) is unchanged.
Updates pageShouldDisplay and visibleCategoryCodesForCurrentPage
to honour the new key alongside the existing notfoundmessage logic.
Docs updated with key description, summary table, and full example.
Documents all keys that can appear under default-category and
categories entries: message, name-latin, notfoundmessage,
pagenotfoundmessage, font, and line-height. Adds a summary table
and updates the full example to show these keys in context.
fetchPageFile now rejects text/html responses so servers with SPA routing
(e.g. Cloudflare Pages with /* /index.html 200) no longer trick the renderer
into treating a fallback index.html as a found markdown file. Category-variant
pages (page.current.md with no plain page.md) now fall through correctly to
their variant URL.
mdcms build now writes a self-unregistering service-worker.js when pwa: no,
evicting any stale caching worker left over from a previous pwa: yes build.
manifest.json is also removed when pwa: no.
https://claude.ai/code/session_01Xs5GyREFhjWxhS1UhW2wA8
Picks up blank <title></title> in app/index.html template (cleaner than
the hardcoded MD-CMS value; mdcms build overwrites it with sitename on
every build either way).
https://claude.ai/code/session_01Xs5GyREFhjWxhS1UhW2wA8
A YAML parse error in config.yml (e.g. a stray tab character) caused
read_config to swallow the exception and return {}, disabling categories
and producing a broken nav.yml with no variants fields and wrong filenames.
read_config now raises ClickException on both OSError and YAMLError.
Documented in docs/knownbugs.md and docs/unreleased.md.
https://claude.ai/code/session_01Xs5GyREFhjWxhS1UhW2wA8
mdcms build now writes the sitename from config.yml into the <title> tag
of index.html. WhatsApp, Slack, and other link-preview crawlers read the
static HTML without executing JavaScript, so the title must be correct in
the raw file. Previously it was blank (or "MD-CMS" in older templates).
The static <title> element previously showed "MD-CMS" before JavaScript
loaded. The JS already sets document.title from config.sitename on boot,
so clearing the initial value ensures the browser tab never displays the
hardcoded string.
mdcms build now writes the sitename from config.yml into the <title> tag
of index.html. WhatsApp, Slack, and other link-preview crawlers read the
static HTML without executing JavaScript, so the title must be correct in
the raw file. Previously it was blank (or "MD-CMS" in older templates).
The static <title> element previously showed "MD-CMS" before JavaScript
loaded. The JS already sets document.title from config.sitename on boot,
so clearing the initial value ensures the browser tab never displays the
hardcoded string.
iOS Safari can fail to honour transform: translateX(-100%) on position:fixed
elements, leaving the sidebar sitting over the content at z-index 100 and
blocking the mobile-header (z-index 50) that contains the hamburger.
Add visibility: hidden to the closed mobile sidebar. A transition-delay of
0.3s (matching the transform duration) keeps the slide-out animation intact —
the sidebar slides away first, then disappears. The open state resets the
transition immediately so the sidebar becomes visible before sliding in.
https://claude.ai/code/session_017r3kqm4FgEGy2DPPzYcLYQ
Pages without a category suffix still map to the default category.
Only posts/ files without a suffix get uncategorized: true in nav.yml
and category: null in search.json.
https://claude.ai/code/session_01EzU13EL8D5Ud2ngQUKDj9e
Files without a category suffix (e.g. post.md alongside post.en.md)
previously only appeared in the default category. They now appear in
every category, so untranslated content is always visible.
- mdcms.py: nav entries with a bare variant get `uncategorized: true`;
search.json keeps `category: null` instead of mapping to default code
- index.html: pageShouldDisplay, posts filter, and category dropdown
all treat uncategorized/null-category items as universally visible
https://claude.ai/code/session_01EzU13EL8D5Ud2ngQUKDj9e
* Fix category picker and hamburger using page colours instead of nav colours
Both elements render against --bg-nav but were using --font-colour (the page
text colour). Switch to --nav-link-colour / --nav-section-heading-colour /
--nav-link-active-colour so they remain legible when nav-background is set to
a colour that contrasts with the page text colour (e.g. dark blue nav with
white nav-link text).
https://claude.ai/code/session_01MA8V1FvCmxjkCYyTxseaxB
* Fix category font not reverting when switching to a no-font category
maybeLoadCategoryFont applied a font-family to document.body but never
cleared it when switching to a category with no font defined. The inline
style overrides the CSS --font-body variable, so the category font
persisted indefinitely.
Fix: reset document.body.style.fontFamily to '' when the target category
has no font (letting --font-body take effect), and re-apply the family
string when switching back to an already-loaded font category.
https://claude.ai/code/session_01MA8V1FvCmxjkCYyTxseaxB
---------
Co-authored-by: Claude <noreply@anthropic.com>
Both elements render against --bg-nav but were using --font-colour (the page
text colour). Switch to --nav-link-colour / --nav-section-heading-colour /
--nav-link-active-colour so they remain legible when nav-background is set to
a colour that contrasts with the page text colour (e.g. dark blue nav with
white nav-link text).
https://claude.ai/code/session_01MA8V1FvCmxjkCYyTxseaxB
Co-authored-by: Claude <noreply@anthropic.com>
Nastaliq and other complex scripts need significantly more vertical
space than Latin text. A new `line-height` key on any category entry
in config.yml overrides --line-height-body for that category and
restores the theme default when switching away.
https://claude.ai/code/session_01LZVnq4wUgdv5oXFLcj6qXf
The mobile header was hidden via mobileHeader.style.display='none' (inline style),
then a dynamically-injected <style> with !important was supposed to reveal it on mobile.
Inline styles and injected stylesheets interact inconsistently across browsers, making
the hamburger invisible on mobile in practice.
Replace with a simple CSS-only approach: add a base rule
'.layout-sidebar .mobile-header { display: none; }' so the existing media-query
'display: flex' override works through normal cascade — no inline style needed,
no !important injection needed.
https://claude.ai/code/session_01HRJsjppKZ2cpmNUAV2NXds