@@ -6,8 +6,31 @@ The `web` generator transforms JSX AST entries into complete web bundles, produc
66
77The ` web ` generator accepts the following configuration options:
88
9- | Name | Type | Default | Description |
10- | -------------- | -------- | ------------------------------------ | ------------------------------------------------------------------------ |
11- | ` output ` | ` string ` | - | The directory where HTML, JavaScript, and CSS files will be written |
12- | ` templatePath ` | ` string ` | ` 'template.html' ` | Path to the HTML template file |
13- | ` imports ` | ` object ` | ` { '#config/Logo': [Node.js Logo] } ` | Object mapping import aliases to package names for external dependencies |
9+ | Name | Type | Default | Description |
10+ | -------------- | -------- | ----------------- | --------------------------------------------------------------------- |
11+ | ` output ` | ` string ` | - | The directory where HTML, JavaScript, and CSS files will be written |
12+ | ` templatePath ` | ` string ` | ` 'template.html' ` | Path to the HTML template file |
13+ | ` imports ` | ` object ` | See below | Object mapping ` #theme/ ` aliases to component paths for customization |
14+
15+ #### Default ` imports `
16+
17+ | Alias | Default | Description |
18+ | ------------------- | -------------------------------------------- | -------------------------------------------- |
19+ | ` #theme/Logo ` | ` @node-core/ui-components/Common/NodejsLogo ` | Logo rendered inside the navigation bar |
20+ | ` #theme/Navigation ` | Built-in ` NavBar ` component | Top navigation bar |
21+ | ` #theme/Sidebar ` | Built-in ` SideBar ` component | Sidebar with version selector and page links |
22+ | ` #theme/Layout ` | Built-in ` Layout ` component | Outermost wrapper around the full page |
23+
24+ Override any alias in your config file to swap in a custom component:
25+
26+ ``` js
27+ // doc-kit.config.mjs
28+ export default {
29+ web: {
30+ imports: {
31+ ' #theme/Logo' : ' ./src/MyLogo.jsx' ,
32+ ' #theme/Sidebar' : ' ./src/MySidebar.jsx' ,
33+ },
34+ },
35+ };
36+ ```
0 commit comments