Proposed 1.1.3-0
Pre-releaseThis 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 recursive
buildCatchAllStaticPathsfunction walksconfig/docsandpages
directories 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'sCodeHighlightcomponent: 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 allReactMarkdown
instances across the codebase (17 files). Pipe tables, strikethrough,
autolinks, and task lists now render correctly. Tables are styled via Tailwind
Typography's.prose tabledefaults.
Changed
- Deleted
src/app/pages/[level1]/index.tsxand
src/app/pages/[level1]/[level2]/index.tsx(replaced by[...slug]). - Removed
buildL1StaticPaths,buildL2StaticPaths, and theSubPageType
interface fromsrc/app/components/util/index.ts. ComponentGuidelinesnow usesMarkdownComponentsand the remark plugins
for consistent rendering.