v1.1.3
This release reworks the markdown page rendering system with four improvements: n-level deep routing, automatic table-of-contents generation, standardized code block styling, and GitHub Flavored Markdown table support.
Features
-
N-level deep markdown routing — Replaced the fixed two-level routing (
[level1]/[level1]/[level2]) with a single[...slug]catch-all route that supports markdown pages at any directory depth. A new recursivebuildCatchAllStaticPathsfunction walksconfig/docsandpagesdirectories to collect.mdfiles at any nesting level. The sidebar menu now also recursively scans directories to surface deeply nested pages. -
Automatic table of contents — The existing but unused
PageTOCcomponent is now wired into the catch-all markdown page. It scans rendered headings (h1–h6) via aMutationObserverand populates the right-hand "On This Page" anchor nav automatically. Fixed a timing bug where headings were scanned before the markdown content was in the DOM, and fixed anchor IDs that were incorrectly prefixed with#(producing##idin URLs). -
Standardized code block styling — Markdown fenced code blocks now render with a toolbar header matching the site's
CodeHighlightcomponent: a language icon, filename or language label, and a copy-to-clipboard button. A newremarkCodeMetaremark plugin preserves the fence info string so metadata like```bash filename="deploy.sh"is parsed and displayed. The Prism theme respects dark mode vianext-themes, and registered languages now include bash, css, scss, jsx, tsx, typescript, yaml, handlebars, and more. -
Markdown table support — Added
remark-gfmto allReactMarkdowninstances across the codebase (17 files). Pipe tables, strikethrough, autolinks, and task lists now render correctly. Tables are styled via Tailwind Typography's.prose tabledefaults.
Bug Fixes
-
New components not detected in dev mode —
npm run startnow watches the parent component directories (fromconfig.entries.components) for newly created components. Previously, only components known at startup had their files watched; adding a new component directory required restarting the dev server. A newwatchComponentDirectorieswatcher detects when config file (.json/.js/.cjs) appears in a new subdirectory, reloads the runtime config, restarts the component and configuration watchers, and processes the new component automatically. -
Heading anchor IDs truncated — The markdown heading anchor generator was only reading the first child node (
children[0]) instead of the full heading text, producing single-character or partial IDs (e.g.id="u"instead ofid="using-icons-in-templates"). A newextractTexthelper recursively walks all children to build the complete anchor slug. -
Fenced code blocks without a language unstyled — Bare
```blocks (no language identifier) now receive the same styled treatment as language-tagged blocks: toolbar, copy button, and themed background. Inline code is unaffected. -
Code blocks pushing page width — Added
min-w-0andmax-w-fullon the code block wrapper and the grid content column to prevent wide code from stretching the layout and pushing the TOC off-screen. -
Frontmatter menu duplicated by auto-scan — When a markdown page defines its sidebar menu via frontmatter
menu, the automatic directory scanner no longer appends duplicate entries. Auto-scanning now only runs as a fallback when no frontmatter menu is present. -
.prosemax-width too narrow — Overrode Tailwind Typography's defaultmax-width: 65chon.proseto100%so markdown content fills the available container width.
Changed
- Deleted
src/app/pages/[level1]/index.tsxandsrc/app/pages/[level1]/[level2]/index.tsx(replaced by[...slug]). - Removed
buildL1StaticPaths,buildL2StaticPaths, and theSubPageTypeinterface fromsrc/app/components/util/index.ts. ComponentGuidelinesnow usesMarkdownComponentsand the remark plugins for consistent rendering.- Added
system/tokens/**paths toknownPathsto prevent catch-all route conflicts with dedicated token pages.
Security Patch
- Brace Expansion was updated to prevent a memory exhaustion issue.
- Changelog tweak 3339466
- Minor security patch to brace-expansion 4c83a3d
- Merge pull request #241 from Convertiv/release/1.1.3 1e98d57