Description
Is your feature request related to a problem? Please describe.
Managing sidebars manually (e.g., via a config.js
or sidebar.js
file) is error-prone and doesn’t scale well for large documentation projects. As content grows or gets reorganized, maintaining sidebar configuration separately from the content introduces redundancy and inconsistency. The inability to dynamically generate or update sidebar structure based on frontmatter metadata (e.g., category
, order
, or section
) limits the potential of Frontmatter CMS to act as a single source of truth for documentation structure.
Describe the solution you'd like
I’d like to see support for sidebar configuration being auto-generated or updated based on frontmatter fields directly within Frontmatter CMS. This could work via:
- A built-in sidebar generator that infers structure from metadata like
category
,title
, andorder
- Live preview or export of the generated sidebar config (e.g., as a
sidebar.js
orsidebar.json
file) - Optional custom rules/templates for how content is grouped and ordered
This would allow content authors to control sidebar structure contextually, directly from each file’s frontmatter.
Describe alternatives you've considered
- Writing a custom script to traverse the content folder and generate the sidebar config at build time. This works but requires additional tooling and removes the benefit of real-time structure updates while editing in the CMS.
- Manually maintaining the sidebar config in parallel with content updates. This introduces duplication of effort and higher risk of inconsistencies, especially in collaborative environments.
Additional context
Static site generators like Docusaurus or VuePress often use hardcoded sidebar configurations. However, many teams already use frontmatter to define logical groupings (e.g., category: "API"
, order: 2
). Leveraging that metadata to drive the sidebar structure would significantly improve authoring UX, reduce friction in documentation maintenance, and reinforce single-source configuration.