Skip to content

Expose per-page Markdown on the docs site #706

@dahlia

Description

@dahlia

VitePress + vitepress-plugin-llms already generates per-page Markdown during the docs build, but there's no UI to reach it. Readers currently have to know about llms.txt or guess the generated file path.

Add a per-page action that lets readers view, copy, or download the generated Markdown for the current page.

What we already know:

  • Fedify docs already use a custom VitePress theme entry at docs/.vitepress/theme/index.ts, so this can be added without restructuring the docs site.
  • The docs config already enables vitepress-plugin-llms in docs/.vitepress/config.mts, so the Markdown-oriented output is already part of the build pipeline.
  • VitePress supports extending the default layout with custom components and layout slots, which should be enough for a small per-page control.
  • vitepress-plugin-llms appears to provide built-in per-page Markdown buttons/components. If they fit the current theme, prefer using them over a bespoke implementation.
  • If the built-in component is not a good fit, a small wrapper that links to the generated Markdown for the current page should still be feasible.

Constraints:

  • The control should fit the existing docs theme instead of introducing a new visual pattern.
  • It should not disturb the page title area, the outline, or the mobile layout.
  • The docs site should still build successfully with mise run docs:build.

Done when:

  • Each documentation page exposes an obvious action for its Markdown form.
  • That action resolves to the correct generated Markdown for the current page.
  • The control works on both desktop and mobile layouts without overlapping existing UI.

Metadata

Metadata

Assignees

Labels

type/documentationImprovements or additions to documentation

Type

Projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions