lite|fullliteSets the display mode of the documentation site.
lite: Lite mode with a left menu and right content areafull: Full site mode with a homepage, top navigation, left menu, and right content areadefault|angulardefaultSets the navbar theme style.
default: Default theme with a white navbar backgroundangular: Angular official site style with a default navbar background of #3f51b5. You can customize it via SCSS variablesbooleanfalseEnables light/dark theme switching. When enabled, users can choose light, dark, or system theme.
stringpackage.nameThe site title, usually the component library name, such as Docgeni.
stringThe logo image URL of the library.
stringnullThe GitHub repository URL of the library.
stringdocsThe directory that contains Markdown documentation. Docgeni scans folders and Markdown files in this directory and generates top-level navigation, side menus, and page content according to its rules.
string.docgeni/siteThe generated site workspace directory. Docgeni syncs component examples and documentation into this directory. If siteProjectName is set, the custom site directory takes precedence and this option is ignored.
stringdist/docgeni-siteThe build output directory of the site. If siteProjectName is set, the custom site's output directory takes precedence and this option is ignored.
csr | ssg | ssrcsrSets how the documentation site is rendered. Docgeni generates the corresponding Angular build options based on this value:
csr: Client-Side Rendering. Pages render in the browser and the build output is static files only, suitable for CDN deploymentssg: Static Site Generation. Documentation pages are pre-rendered to HTML at build time, which improves SEO and first paintssr: Server-Side Rendering. Requires a Node.js server at runtime, suitable when you need dynamic server capabilitiestsmodule.exports = { renderMode: 'ssg', };
After changing
renderMode, rundocgeni buildagain. Docgeni will sync the site template and Angular build configuration automatically.
string.docgeni/publicThe directory for custom site assets. Docgeni copies index.html, favicon.ico, styles.scss, assets, .browserslistrc, and tsconfig.json from this directory into the site directory to customize the site appearance and configuration. See Customize Site for details.
string.docgeni/componentsThe directory for custom built-in components. See Custom Built-in Components.
stringnullThe project name of a custom Angular site. In addition to the default documentation and examples, you can create a site project in the repository and set its name here. Docgeni will sync the generated documentation and examples into that project. See Customize Site for details.
content | menu | false | hiddencontentControls how the table of contents (TOC) is displayed.
content: shown on the right side of the content areamenu: shown in the left menufalse / hidden: TOC is hiddenstringnullSite footer content. HTML is supported, for example: Open-source MIT Licensed | Copyright © 2020-present Powered by PingCode.
stringen-usThe default locale, such as zh-cn or en-us.
Array<{key: string, name: string}>[]The list of supported locales. If you do not need multiple languages, leave this empty and only content for defaultLocale will be generated.
Array<NavigationItem>[]Customizes the top navigation bar and menu. It is commonly used for external links and top-level library navigation, for example:
tsmodule.exports = { ... navs: [ null, { title: 'GitHub', path: 'https://github.com/docgeni/docgeni', isExternal: true }, { title: 'Components', path: 'components', lib: 'alib' }, ], ... }
Top-level navigation generated from the
docsdirectory is appended to the end of thenavsarray by default. Insertnullas a placeholder to control the order. In the example above, the generated navigation appears before the GitHub link.
Array<DocgeniLibrary>[]Component library configuration. See configuration/lib for field details.
tsmodule.exports = { ... libs: [ { name: 'alib', rootDir: './packages/a-lib', categories: [ { id: 'general', title: '通用', locales: { 'en-us': { title: 'General' } } } ] } ], ... }
{ host?: string }nullWhen enabled, sitemap.xml is generated during the build. host specifies the domain prefix for generated URLs.
DocgeniAlgoliaConfignullConfigures Algolia DocSearch. You need to provide apiKey and indexName.
js{ algolia: { apiKey: 'Your api key', // Provided in the approval email after applying for DocSearch indexName: 'docgeni', // Index name } }
If your site does not meet DocSearch's free eligibility criteria, you can run your own crawler to index the site and upload the data to Algolia. In that case, you also need to provide appId.
js{ algolia: { appId: 'Your app id', apiKey: 'Your api key', indexName: 'docgeni', } }