NgMd

May 31, 2026 ยท View on GitHub

A comprehensive list of features we could add. Pulled from adev, VitePress, Starlight, Nextra, Docusaurus. Not all of these will ship. Use this as a menu to pick from.

Status legend: โœ… done ยท ๐ŸŸก partial ยท โŒ not done


1. Authoring components

NgMd's model: prose lives in .md, chrome lives as Angular components composed in .page.ts. The adev pattern of custom HTML tags inside markdown was explored and rejected in May 2026 (dual-pipeline marked instances plus HTML-escape friction made it more cost than win). Inline media (<ngmd-video>, <ngmd-image>) is the exception, kept as marked extensions because the tags are self-closing leaves with no markdown body.

Shipped as Angular components under src/app/ui/:

  • โœ… <ngmd-callout type="info|tip|success|warning|danger" title="..."> โ€” bordered box with coloured stripe
  • โœ… <ngmd-alert severity="info|warning|critical|helpful|important"> โ€” single-line banner
  • โœ… <ngmd-card title="..." link="..." cta="..."> โ€” bordered card, optional router link
  • โœ… <ngmd-tabs> + <ngmd-tab title="..."> โ€” hand-rolled tabs with ARIA roles, arrow-key navigation, and Home/End shortcuts. Works inline in .md (children are components, not directive-on-template).
  • โœ… <ngmd-pill-row> + <ngmd-pill href="..." title="..."> โ€” horizontal pill links
  • โœ… <ngmd-workflow> + <ngmd-step title="..."> โ€” numbered step list
  • โœ… <ngmd-hero title="..." gradient> โ€” page hero
  • โœ… <ngmd-code-block header="..." language="..." [code]> โ€” code block with header bar, lazy-loaded shiki + dual theme

Shipped as marked extensions (usable inline in .md):

  • โœ… <ngmd-video src="..." title="..."/> โ€” YouTube / Vimeo URL normalisation
  • โœ… <ngmd-image src="..." alt="..." caption="..."/> โ€” figure with caption + lazy load
  • โœ… <ngmd-accordion> + <ngmd-accordion-item title="..." open> โ€” disclosure list backed by native <details> for keyboard + a11y for free
  • โœ… <ngmd-badge variant="alpha|beta|stable|deprecated|new"> โ€” inline status pill
  • โœ… *Keyword inline auto-linking โ€” declare in ngmd.config.ts > keywords, *AnalogJS etc. become links

Code-fence affordances (build-time marked extensions):

  • โœ… ```ts file="src/foo.ts#L5-L20" โ€” import code from source, GitHub-style line ranges, // ngmd-ignore-line strip markers, header bar links to GitHub
  • โœ… ```bash group="install" name="pnpm" active โ€” adjacent fences with same group= merge into a tabbed UI
  • โœ… ```ts {1,3-5} โ€” highlight matching lines with a fuchsia stripe + tint

Open follow-ups:

  • โœ… <ngmd-card-grid columns="2|3"> โ€” n-up card grid, mobile stacks to single column
  • โŒ Combined file= + {1,3-5} line highlight on the same fence โ€” adev parity, ~1h. Tweak the regex in ngmd-code-import.ts to also parse the brace list.
  • โŒ Diff view via ```diff โ€” adev parity, ~1h. Shiki already emits the tokens; just need CSS for green/red lines.
  • โŒ <ngmd-hero> image slot via content projection โ€” adev's docs-decorative-header has an image slot. ~1-2h to add a named <ng-content select="[hero-image]"> and lay it out next to the title.
  • โŒ Multi-file code group โ€” extend group="..." so different fences inside one group can be app.ts + app.html + app.css style (adev's docs-code-multifile). 1-2 days; the marked extension already supports grouping, needs richer tab labels + better visual treatment.
  • โŒ Stackblitz preview embed (<ngmd-stackblitz project="...">) โ€” adev's docs-code preview does runnable demos. 1-2 days. Big tutorial unlock.
  • โŒ API reference table component โ€” specialised shape for class members (signature / default / description), even before auto-extraction. ~half day.

2. Page chrome (every docs starter has these)

  • โœ… Previous / Next page navigation at the bottom of each doc page (auto-derived from ngmd.config.ts nav)
  • โœ… "Edit on GitHub" link per page
  • โœ… "Last updated" timestamp pulled from git history (git log -1 --format=%cs)
  • โœ… Heading anchor copy-link โ€” hover an h1/h2/h3 to reveal a # icon that copies the URL
  • โŒ Reading time estimate (word count / 200 wpm)
  • โŒ "Was this page helpful?" feedback widget at bottom
  • โŒ Page-level frontmatter overrides for layout / title / description / OG image

3. Content tools

  • โŒ Mermaid diagram rendering โ€” ```mermaid blocks
  • โŒ Math rendering โ€” KaTeX or MathJax for ```math blocks or $...$ inline
  • โŒ Footnotes ([^1] markdown syntax)
  • โŒ Task lists rendering [ ] / [x]
  • โŒ Definition lists
  • โŒ Emoji shortcodes (:smile: โ†’ ๐Ÿ˜„)
  • โŒ Tweet / CodePen / CodeSandbox embeds
  • โŒ Image lightbox on click
  • ๐ŸŸก Image optimization โ€” manual for now, no automatic responsive srcset

4. Search / discovery

  • โœ… Cmd+K palette โ€” Orama BM25 + fuzzy (length-scaled) + heading/title/body boosts + <mark> highlighting (0.1.2)
  • โœ… Algolia DocSearch integration (opt-in via site.algolia keys + pnpm add algoliasearch, 0.1.2)
  • โœ… Orama offline search index built at build time (search-index.plugin.ts โ†’ virtual:ngmd/search-index, 0.1.2)
  • โŒ Search result keyboard navigation (arrows + enter). Reverted in 0.1.2 pending a proper focus / scroll polish pass.
  • โœ… Recent searches + โœ… favorites (localStorage, 0.1.2 recents / 0.1.3 favorites). Star toggle per row, split into Favorites + Recent sections.

5. Library-author features

  • โŒ API reference auto-generation from JSDoc / ts-morph (the headline library-author feature, explicitly punted to a future release)
  • โœ… Keyword auto-linking โ€” page-tier via *Keyword (API-tier deferred, depends on auto-gen above)
  • โŒ Symbol search in palette
  • โŒ Component playgrounds with editable code + Stackblitz launcher
  • โŒ Interactive props/args/controls (Storybook-style)
  • โŒ Status badges per component (alpha / beta / stable / deprecated)

6. Build / infrastructure

  • โœ… Build-time external-link guard (Vite plugin, errors on raw external <a> without target="_blank")
  • โœ… Build-time internal-link guard (errors on broken #fragment and /route#fragment links)
  • โœ… Build-time page-meta plugin (virtual:ngmd/page-meta exposes editUrl + lastUpdated per route)
  • โœ… Sitemap.xml auto-generation
  • โœ… robots.txt
  • โŒ RSS feed for changelog / blog
  • โŒ Service worker / PWA support
  • โŒ OG image auto-generation per page
  • โŒ Twitter card meta auto-fill
  • โŒ Analytics integration hooks

7. Theming / branding

  • โœ… CSS-variable theme tokens (--bg, --bg-muted, --fg, --muted, --border, --border-strong, --primary, --accent, --accent-soft, --accent-gradient, --radius-*, --font-*)
  • โœ… Fuchsia accent wired through sidebar active, TOC active, palette row, prev/next hover, heading anchor hover, markdown link hover + focus ring
  • ๐ŸŸก Theme is documented in theming.md but the live preview / swatch grid is missing
  • โŒ Live theme preview component that swaps tokens
  • โŒ Theme presets / palettes (e.g. "Stone", "Slate", "Rose", "Violet")
  • โŒ Brand assets page (logo, colors, fonts displayed in a kit)
  • โŒ Print stylesheet
  • โŒ RTL language support

8. Multi-version + i18n (v2 territory)

  • โŒ Versioned docs (Docusaurus-style โ€” v1/, v2/ folders, version switcher in header)
  • โŒ i18n / locale switcher (header dropdown, locale-prefixed routes)
  • โŒ Translation memory / source-of-truth tracking

9. Authoring DX

  • โœ… npx create-ngmd scaffolder โ€” published as create-ngmd@0.0.3 on npm. Works via pnpm create ngmd@latest, npm create ngmd@latest, yarn create ngmd, bun create ngmd. Slim template ships with the [...slug].page.ts catch-all so users drop .md files and get routes with no wrapper.
  • โŒ ngmd add <component> CLI for shadcn-style component installation
  • โŒ ngmd new page <slug> CLI to generate a new markdown page + sidebar entry
  • โŒ VS Code snippets for common docs patterns (callout, tabs, pill row)

10. Polish / nice-to-have

  • โœ… View Transitions API crossfade between routes (withViewTransitions() in app.config.ts, 150ms duration tuned in styles.css; falls back to default behaviour on Chrome <111)
  • โŒ Loading skeleton while markdown content loads
  • โŒ Back-to-top button
  • โŒ Keyboard shortcut help dialog (press ?)
  • โŒ Inline code-block copy success toast
  • โŒ Code-block line numbers
  • โœ… Code-block line highlighting ( ```ts {3-5} syntax)
  • โŒ Code-block diff view ( ```diff blocks โ€” shiki supports, needs CSS)
  • โŒ Inline Show source toggle on component demos
  • โŒ Lighthouse audit + a11y compliance pass

11. Already shipped (for reference)

Foundation:

  • โœ… AnalogJS + Vite 8 + Angular 21 + pnpm/npm/yarn/bun support
  • โœ… Markdown content collections via src/content/
  • โœ… Shiki syntax highlighting pinned to 1.29.2 (bash, md, json, ts, html, css)
  • โœ… Tailwind v4 + class-based dark mode (@variant dark)
  • โœ… Light / dark / auto theme cycle with no-flash inline boot script

Chrome:

  • โœ… Translucent sticky header with backdrop-blur-sm
  • โœ… Sidebar accordion driven by ngmd.config.ts
  • โœ… Breadcrumb derived from current route
  • โœ… Right-side on-page TOC with scroll-spy
  • โœ… Mobile drawer for sidebar + collapsible "On this page"
  • โœ… Cmd+K command palette with content-aware search
  • โœ… Page footer per docs route: prev/next + edit-on-github + last-updated
  • โœ… Heading anchor copy buttons (h1/h2/h3, fuchsia hover)
  • โœ… Code-block copy buttons on every <pre> (runtime enhancer)
  • โœ… External links auto-targeted to a new tab (runtime enhancer)
  • โœ… Smooth scroll on page navigation, sticky-header offset via ViewportScroller.setOffset
  • โœ… Body scroll lock when palette open
  • โœ… 404 page with chrome-hidden layout

Authoring:

  • โœ… Authoring component suite under src/app/ui/: callout, alert, card, card-grid, tabs (hand-rolled ARIA + keyboard nav), pill row, workflow, hero, code-block (lazy-shiki + dual theme), accordion, badge, video, image
  • โœ… <ngmd-video> + <ngmd-image> marked extensions for inline media in .md
  • โœ… *Keyword inline auto-linking (12 default keywords in ngmd.config.ts)
  • โœ… Code-fence file imports with GitHub-linked header bar
  • โœ… Code-fence group tabs (group="install" name="pnpm" active)
  • โœ… Code-fence line highlighting (```ts {1,3-5})

Build pipeline:

  • โœ… External-link guard (Vite plugin, errors on raw external anchors missing target="_blank")
  • โœ… Internal-link guard (errors on broken in-page and cross-page anchor fragments)
  • โœ… page-meta plugin โ†’ virtual:ngmd/page-meta
  • โœ… sitemap plugin โ†’ sitemap.xml + robots.txt emitted into client build

Distribution:

  • โœ… create-ngmd/ scaffolder (Node builtins, slim template, package-manager detection)
  • โœ… Showcase page at /concepts/components demoing every NgmdUi component
  • โœ… Hexagon logo with rose โ†’ fuchsia โ†’ purple gradient stroke, Geist Mono wordmark
  • โœ… Open Graph + meta tags, SVG favicon
  • โœ… License, README, package.json metadata

Up next

Three candidates picked from a wider feature review. Pick from the top.

  • โŒ JSDoc-driven API reference. Opt-in ngmd.api.ts-style scope file globs TS sources, parses JSDoc (via ts-morph or the Angular compiler API), emits virtual .page.ts routes. Render @deprecated / @experimental / @beta as inline status badges. Heaviest lift on this list; the single biggest missing feature for library docs use cases.
  • โœ… Sidebar status badges. Shipped in 0.1.1 (frontmatter), migrated to nav config in 0.1.2 matching adev's NavigationItem.status pattern. {label, href, status: 'beta'} on a NavItem renders a coloured chip next to the sidebar label. Six variants (new, updated, alpha, beta, stable, deprecated) sourced from the single BADGE_VARIANTS map in src/types/badge.ts. See /concepts/markdown-routes#sidebar-status-badges.
  • โœ… Search relevance pass. Replaced the keyword-substring filter with Orama (BM25 + fuzzy + heading/title/body boost). Build-time index plugin emits virtual:ngmd/search-index; SearchService picks Orama by default or Algolia DocSearch when site.algolia is set. Adds noIndex: true frontmatter, search history in localStorage, and <mark> match highlighting. See /concepts/search.