You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
discussion: doc-kit jsx-ast generator manual paths and customization #661
@ovflowd if you have an issue with the current approach, feel free to open a designated issue and voice your concerns, which others can agree or refute
Steemed from the issue above, I believe we need to reconsider on the long-term the responsibilities of the jsx-ast generator, as it should be a more generic/abstract layer. Since doc-kit is supposed to be used to generate docs with different theming/different 3rd party generators (long-term goal), eventually it needs to be by design more decoupled of @node-core/ui-components on the ast phase. Where the web generator and legacy-html/legacy-html-all become more Node.js oriented and as discussed not part of the default doc-kit bundle.
I know earlier I said I disagreed on the idea of less JSX generator, but I've done some thinking, and I'm in agreement that the layout should be a UI component (in the web generator).
<Layout sidebar={sidebarProps} metabar={metabarProps}>{children}</Layout> where children is the main block and it's children. Then users can "swap" in layout for their own component.
Activity
avivkeller commentedon Mar 8, 2026
Things we need to improve customization on for our own learn docs:
avivkeller commentedon Mar 8, 2026
I know earlier I said I disagreed on the idea of less JSX generator, but I've done some thinking, and I'm in agreement that the layout should be a UI component (in the
webgenerator).(That component being the JSX-syntax of https://github.com/nodejs/doc-kit/blob/main/src/generators/jsx-ast/utils/buildContent.mjs#L289-L316)
<Layout sidebar={sidebarProps} metabar={metabarProps}>{children}</Layout>wherechildrenis themainblock and it's children. Then users can "swap" in layout for their own component.