fix: enable theme sections and local search
Build and publish Corp v1 steering documentation / build (push) Successful in 45s
Build and publish Corp v1 steering documentation / build (push) Successful in 45s
This commit is contained in:
+36
-10
@@ -2,6 +2,12 @@ import {themes as prismThemes} from 'prism-react-renderer';
|
||||
import type {Config} from '@docusaurus/types';
|
||||
import type * as Preset from '@docusaurus/preset-classic';
|
||||
|
||||
const docsCommon = {
|
||||
showLastUpdateAuthor: true,
|
||||
showLastUpdateTime: true,
|
||||
editUrl: 'https://gitea.lego-cloud.eu/corp-v1/sterring-commitee/_edit/main/',
|
||||
};
|
||||
|
||||
const config: Config = {
|
||||
title: 'Corp v1 Steering Committee',
|
||||
tagline: 'Project governance, teams, and membership registry',
|
||||
@@ -17,31 +23,51 @@ const config: Config = {
|
||||
'classic',
|
||||
{
|
||||
docs: {
|
||||
...docsCommon,
|
||||
path: 'docs/overview',
|
||||
routeBasePath: '/',
|
||||
sidebarPath: './sidebars.ts',
|
||||
editUrl: 'https://gitea.lego-cloud.eu/corp-v1/sterring-commitee/_edit/main/',
|
||||
showLastUpdateAuthor: true,
|
||||
showLastUpdateTime: true,
|
||||
sidebarPath: './sidebars/overview.ts',
|
||||
},
|
||||
blog: false,
|
||||
theme: {customCss: './src/css/custom.css'},
|
||||
sitemap: {changefreq: 'weekly', priority: 0.5},
|
||||
} satisfies Preset.Options,
|
||||
]],
|
||||
plugins: [
|
||||
['@docusaurus/plugin-content-docs', {...docsCommon, id: 'projects', path: 'docs/projects', routeBasePath: 'projects', sidebarPath: './sidebars/projects.ts'}],
|
||||
['@docusaurus/plugin-content-docs', {...docsCommon, id: 'teams', path: 'docs/teams', routeBasePath: 'teams', sidebarPath: './sidebars/teams.ts'}],
|
||||
['@docusaurus/plugin-content-docs', {...docsCommon, id: 'members', path: 'docs/members', routeBasePath: 'members', sidebarPath: './sidebars/members.ts'}],
|
||||
['@docusaurus/plugin-content-docs', {...docsCommon, id: 'governance', path: 'docs/governance', routeBasePath: 'governance', sidebarPath: './sidebars/governance.ts'}],
|
||||
],
|
||||
themes: [[
|
||||
require.resolve('@easyops-cn/docusaurus-search-local'),
|
||||
{
|
||||
hashed: 'filename',
|
||||
indexDocs: true,
|
||||
indexBlog: false,
|
||||
indexPages: true,
|
||||
docsRouteBasePath: ['/', 'projects', 'teams', 'members', 'governance'],
|
||||
language: ['en'],
|
||||
highlightSearchTermsOnTargetPage: true,
|
||||
explicitSearchResultPath: true,
|
||||
searchResultLimits: 12,
|
||||
searchResultContextMaxLength: 120,
|
||||
},
|
||||
]],
|
||||
themeConfig: {
|
||||
colorMode: {defaultMode: 'dark', disableSwitch: false, respectPrefersColorScheme: true},
|
||||
navbar: {
|
||||
title: 'CORP V1 / STEERING',
|
||||
items: [
|
||||
{to: '/projects/', label: 'Projects', position: 'left'},
|
||||
{to: '/teams/', label: 'Teams', position: 'left'},
|
||||
{to: '/members/', label: 'Members', position: 'left'},
|
||||
{to: '/governance/project-lifecycle/', label: 'Governance', position: 'left'},
|
||||
{type: 'docSidebar', sidebarId: 'projectsSidebar', docsPluginId: 'projects', label: 'Projects', position: 'left'},
|
||||
{type: 'docSidebar', sidebarId: 'teamsSidebar', docsPluginId: 'teams', label: 'Teams', position: 'left'},
|
||||
{type: 'docSidebar', sidebarId: 'membersSidebar', docsPluginId: 'members', label: 'Members', position: 'left'},
|
||||
{type: 'docSidebar', sidebarId: 'governanceSidebar', docsPluginId: 'governance', label: 'Governance', position: 'left'},
|
||||
{href: 'https://gitea.lego-cloud.eu/corp-v1/sterring-commitee', label: 'Gitea ↗', position: 'right'},
|
||||
],
|
||||
},
|
||||
footer: {
|
||||
style: 'dark',
|
||||
style: 'light',
|
||||
links: [{title: 'Registry', items: [
|
||||
{label: 'Projects', to: '/projects/'},
|
||||
{label: 'Teams', to: '/teams/'},
|
||||
@@ -52,7 +78,7 @@ const config: Config = {
|
||||
]}],
|
||||
copyright: `© ${new Date().getFullYear()} Corp v1 Steering Committee`,
|
||||
},
|
||||
prism: {theme: prismThemes.oneDark, darkTheme: prismThemes.oneDark},
|
||||
prism: {theme: prismThemes.github, darkTheme: prismThemes.oneDark},
|
||||
} satisfies Preset.ThemeConfig,
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user