fix: enable theme sections and local search
Build and publish Corp v1 steering documentation / build (push) Successful in 45s

This commit is contained in:
2026-08-12 13:13:42 +00:00
parent 7cc3bd42a0
commit e44abc1028
18 changed files with 628 additions and 304 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
--- ---
title: Decision Log title: Decision Log
slug: /governance/decisions/ slug: /decisions/
sidebar_position: 2 sidebar_position: 2
--- ---
+1 -1
View File
@@ -1,6 +1,6 @@
--- ---
title: Project Lifecycle title: Project Lifecycle
slug: /governance/project-lifecycle/ slug: /project-lifecycle/
sidebar_position: 1 sidebar_position: 1
--- ---
+1 -1
View File
@@ -1,6 +1,6 @@
--- ---
title: Members Registry title: Members Registry
slug: /members/ slug: /
sidebar_position: 1 sidebar_position: 1
--- ---
+3 -3
View File
@@ -13,9 +13,9 @@ This repository is the authoritative governance workspace for starting, steering
| Registry | Purpose | | Registry | Purpose |
|---|---| |---|---|
| [Projects](./projects/index.md) | Portfolio status, ownership, lifecycle, and outcomes | | [Projects](/projects/) | Portfolio status, ownership, lifecycle, and outcomes |
| [Teams](./teams/index.md) | Team mandates, responsibilities, and project assignments | | [Teams](/teams/) | Team mandates, responsibilities, and project assignments |
| [Members](./members/index.md) | Member identity, roles, and team membership | | [Members](/members/) | Member identity, roles, and team membership |
## Operating principle ## Operating principle
+1 -1
View File
@@ -1,6 +1,6 @@
--- ---
title: Projects Registry title: Projects Registry
slug: /projects/ slug: /
sidebar_position: 1 sidebar_position: 1
--- ---
+1 -1
View File
@@ -1,6 +1,6 @@
--- ---
title: Teams Registry title: Teams Registry
slug: /teams/ slug: /
sidebar_position: 1 sidebar_position: 1
--- ---
+36 -10
View File
@@ -2,6 +2,12 @@ import {themes as prismThemes} from 'prism-react-renderer';
import type {Config} from '@docusaurus/types'; import type {Config} from '@docusaurus/types';
import type * as Preset from '@docusaurus/preset-classic'; 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 = { const config: Config = {
title: 'Corp v1 Steering Committee', title: 'Corp v1 Steering Committee',
tagline: 'Project governance, teams, and membership registry', tagline: 'Project governance, teams, and membership registry',
@@ -17,31 +23,51 @@ const config: Config = {
'classic', 'classic',
{ {
docs: { docs: {
...docsCommon,
path: 'docs/overview',
routeBasePath: '/', routeBasePath: '/',
sidebarPath: './sidebars.ts', sidebarPath: './sidebars/overview.ts',
editUrl: 'https://gitea.lego-cloud.eu/corp-v1/sterring-commitee/_edit/main/',
showLastUpdateAuthor: true,
showLastUpdateTime: true,
}, },
blog: false, blog: false,
theme: {customCss: './src/css/custom.css'}, theme: {customCss: './src/css/custom.css'},
sitemap: {changefreq: 'weekly', priority: 0.5}, sitemap: {changefreq: 'weekly', priority: 0.5},
} satisfies Preset.Options, } 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: { themeConfig: {
colorMode: {defaultMode: 'dark', disableSwitch: false, respectPrefersColorScheme: true}, colorMode: {defaultMode: 'dark', disableSwitch: false, respectPrefersColorScheme: true},
navbar: { navbar: {
title: 'CORP V1 / STEERING', title: 'CORP V1 / STEERING',
items: [ items: [
{to: '/projects/', label: 'Projects', position: 'left'}, {type: 'docSidebar', sidebarId: 'projectsSidebar', docsPluginId: 'projects', label: 'Projects', position: 'left'},
{to: '/teams/', label: 'Teams', position: 'left'}, {type: 'docSidebar', sidebarId: 'teamsSidebar', docsPluginId: 'teams', label: 'Teams', position: 'left'},
{to: '/members/', label: 'Members', position: 'left'}, {type: 'docSidebar', sidebarId: 'membersSidebar', docsPluginId: 'members', label: 'Members', position: 'left'},
{to: '/governance/project-lifecycle/', label: 'Governance', 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'}, {href: 'https://gitea.lego-cloud.eu/corp-v1/sterring-commitee', label: 'Gitea ↗', position: 'right'},
], ],
}, },
footer: { footer: {
style: 'dark', style: 'light',
links: [{title: 'Registry', items: [ links: [{title: 'Registry', items: [
{label: 'Projects', to: '/projects/'}, {label: 'Projects', to: '/projects/'},
{label: 'Teams', to: '/teams/'}, {label: 'Teams', to: '/teams/'},
@@ -52,7 +78,7 @@ const config: Config = {
]}], ]}],
copyright: `© ${new Date().getFullYear()} Corp v1 Steering Committee`, 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, } satisfies Preset.ThemeConfig,
}; };
+3 -1
View File
@@ -12,12 +12,14 @@
"serve": "docusaurus serve", "serve": "docusaurus serve",
"write-translations": "docusaurus write-translations", "write-translations": "docusaurus write-translations",
"write-heading-ids": "docusaurus write-heading-ids", "write-heading-ids": "docusaurus write-heading-ids",
"typecheck": "tsc" "typecheck": "tsc",
"verify:portal": "node scripts/verify-portal.mjs"
}, },
"dependencies": { "dependencies": {
"@docusaurus/core": "3.10.2", "@docusaurus/core": "3.10.2",
"@docusaurus/faster": "3.10.2", "@docusaurus/faster": "3.10.2",
"@docusaurus/preset-classic": "3.10.2", "@docusaurus/preset-classic": "3.10.2",
"@easyops-cn/docusaurus-search-local": "^0.55.3",
"@mdx-js/react": "^3.0.0", "@mdx-js/react": "^3.0.0",
"clsx": "^2.0.0", "clsx": "^2.0.0",
"prism-react-renderer": "^2.3.0", "prism-react-renderer": "^2.3.0",
+419 -245
View File
File diff suppressed because it is too large Load Diff
+40
View File
@@ -0,0 +1,40 @@
import assert from 'node:assert/strict';
import {existsSync, readFileSync, readdirSync} from 'node:fs';
import {join} from 'node:path';
const root = process.cwd();
const read = (path) => readFileSync(join(root, path), 'utf8');
const config = read('docusaurus.config.ts');
const packageJson = JSON.parse(read('package.json'));
const globalCss = read('src/css/custom.css');
const homepageCss = read('src/pages/index.module.css');
assert.match(config, /defaultMode:\s*'dark'/, 'dark must remain the default theme');
assert.match(config, /disableSwitch:\s*false/, 'theme switch must be enabled');
assert.match(globalCss, /\[data-theme=['"]light['"]\]/, 'global CSS needs an explicit light palette');
assert.match(homepageCss, /:global\(\[data-theme=['"]light['"]\]\)/, 'homepage needs a light palette');
assert.doesNotMatch(globalCss, /html,\s*body\s*\{\s*background:\s*#08101b/, 'document background must not be hard-coded dark');
for (const section of ['projects', 'teams', 'members', 'governance']) {
assert.match(config, new RegExp(`id:\\s*'${section}'`), `${section} docs plugin is missing`);
assert.match(config, new RegExp(`sidebarId:\\s*'${section}Sidebar'`), `${section} navbar item does not target its dedicated sidebar`);
assert.ok(existsSync(join(root, `sidebars/${section}.ts`)), `${section} sidebar file is missing`);
}
assert.ok(packageJson.dependencies?.['@easyops-cn/docusaurus-search-local'], 'local search dependency is missing');
assert.match(config, /@easyops-cn\/docusaurus-search-local/, 'local search theme is not configured');
assert.match(config, /indexPages:\s*true/, 'custom pages must be indexed');
for (const route of ['/', 'projects', 'teams', 'members', 'governance']) {
assert.ok(config.includes(`'${route}'`), `search does not include route base ${route}`);
}
if (existsSync(join(root, 'build'))) {
const filename = readdirSync(join(root, 'build')).find((name) => /^search-index(?:-[a-f0-9]+)?\.json$/.test(name));
assert.ok(filename, 'production search index is missing');
const search = readFileSync(join(root, 'build', filename), 'utf8').toLowerCase();
for (const term of ['projects registry', 'teams registry', 'members registry', 'project lifecycle', 'corp v1 steering committee']) {
assert.ok(search.includes(term), `search index is missing: ${term}`);
}
}
console.log('Portal behavior checks passed.');
-13
View File
@@ -1,13 +0,0 @@
import type {SidebarsConfig} from '@docusaurus/plugin-content-docs';
const sidebars: SidebarsConfig = {
steering: [
'index',
{type: 'category', label: 'Projects Registry', link: {type: 'doc', id: 'projects/index'}, items: [{type: 'autogenerated', dirName: 'projects'}]},
{type: 'category', label: 'Teams Registry', link: {type: 'doc', id: 'teams/index'}, items: [{type: 'autogenerated', dirName: 'teams'}]},
{type: 'category', label: 'Members Registry', link: {type: 'doc', id: 'members/index'}, items: [{type: 'autogenerated', dirName: 'members'}]},
{type: 'category', label: 'Governance', items: ['governance/project-lifecycle', 'governance/decisions']},
],
};
export default sidebars;
+10
View File
@@ -0,0 +1,10 @@
import type {SidebarsConfig} from '@docusaurus/plugin-content-docs';
const sidebars: SidebarsConfig = {
governanceSidebar: [
{type: 'doc', id: 'project-lifecycle', label: 'Project Lifecycle'},
{type: 'doc', id: 'decisions', label: 'Decision Log'},
],
};
export default sidebars;
+7
View File
@@ -0,0 +1,7 @@
import type {SidebarsConfig} from '@docusaurus/plugin-content-docs';
const sidebars: SidebarsConfig = {
membersSidebar: [{type: 'doc', id: 'index', label: 'Members Registry'}],
};
export default sidebars;
+7
View File
@@ -0,0 +1,7 @@
import type {SidebarsConfig} from '@docusaurus/plugin-content-docs';
const sidebars: SidebarsConfig = {
overviewSidebar: [{type: 'doc', id: 'index', label: 'Steering overview'}],
};
export default sidebars;
+7
View File
@@ -0,0 +1,7 @@
import type {SidebarsConfig} from '@docusaurus/plugin-content-docs';
const sidebars: SidebarsConfig = {
projectsSidebar: [{type: 'doc', id: 'index', label: 'Projects Registry'}],
};
export default sidebars;
+7
View File
@@ -0,0 +1,7 @@
import type {SidebarsConfig} from '@docusaurus/plugin-content-docs';
const sidebars: SidebarsConfig = {
teamsSidebar: [{type: 'doc', id: 'index', label: 'Teams Registry'}],
};
export default sidebars;
+43 -17
View File
@@ -1,6 +1,7 @@
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@500;700&display=swap'); @import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@500;700&display=swap');
:root { :root,
[data-theme='light'] {
--ifm-font-family-base: 'Inter', system-ui, sans-serif; --ifm-font-family-base: 'Inter', system-ui, sans-serif;
--ifm-font-family-monospace: 'JetBrains Mono', monospace; --ifm-font-family-monospace: 'JetBrains Mono', monospace;
--ifm-color-primary: #0f766e; --ifm-color-primary: #0f766e;
@@ -10,6 +11,21 @@
--ifm-color-primary-light: #14b8a6; --ifm-color-primary-light: #14b8a6;
--ifm-color-primary-lighter: #2dd4bf; --ifm-color-primary-lighter: #2dd4bf;
--ifm-color-primary-lightest: #5eead4; --ifm-color-primary-lightest: #5eead4;
--ifm-background-color: #f7f9fb;
--ifm-background-surface-color: #ffffff;
--ifm-color-content: #111827;
--ifm-color-content-secondary: #526174;
--ifm-toc-border-color: #cdd5df;
--portal-navbar-bg: rgba(255, 255, 255, .97);
--portal-navbar-ink: #111827;
--portal-navbar-muted: #526174;
--portal-border: #cdd5df;
--portal-sidebar-bg: #ffffff;
--portal-footer-bg: #edf1f5;
--portal-footer-ink: #111827;
--portal-footer-muted: #526174;
--portal-active-bg: rgba(15, 118, 110, .09);
--portal-accent: #0f766e;
--ifm-global-radius: 0; --ifm-global-radius: 0;
--ifm-code-border-radius: 0; --ifm-code-border-radius: 0;
--ifm-pre-border-radius: 0; --ifm-pre-border-radius: 0;
@@ -33,38 +49,48 @@
--ifm-color-content: #f5f7fa; --ifm-color-content: #f5f7fa;
--ifm-color-content-secondary: #a5b0c2; --ifm-color-content-secondary: #a5b0c2;
--ifm-toc-border-color: #283345; --ifm-toc-border-color: #283345;
--portal-navbar-bg: rgba(8, 16, 27, .97);
--portal-navbar-ink: #f5f7fa;
--portal-navbar-muted: #a5b0c2;
--portal-border: #283345;
--portal-sidebar-bg: #08101b;
--portal-footer-bg: #050b12;
--portal-footer-ink: #f5f7fa;
--portal-footer-muted: #a5b0c2;
--portal-active-bg: rgba(94, 234, 212, .08);
--portal-accent: #5eead4;
} }
html, body { background: #08101b; } html,
body { background: var(--ifm-background-color); }
/* Corp v1 has an explicit no-rounding rule. This intentionally overrides /* Corp v1 has an explicit no-rounding rule. */
Infima and third-party component radii across all rendered shapes. */
*, *::before, *::after { border-radius: 0 !important; } *, *::before, *::after { border-radius: 0 !important; }
.navbar { .navbar {
height: 68px; height: 68px;
background: rgba(8, 16, 27, .97) !important; background: var(--portal-navbar-bg) !important;
border-bottom: 1px solid #283345 !important; border-bottom: 1px solid var(--portal-border) !important;
box-shadow: none !important; box-shadow: none !important;
} }
.navbar__brand { margin-right: 2.5rem; } .navbar__brand { margin-right: 2.5rem; }
.navbar__title { color: #f5f7fa !important; font-size: .87rem; letter-spacing: .09em; font-weight: 700; } .navbar__title { color: var(--portal-navbar-ink) !important; font-size: .87rem; letter-spacing: .09em; font-weight: 700; }
.navbar__link { color: #a5b0c2 !important; font-size: .86rem; font-weight: 500; } .navbar__link { color: var(--portal-navbar-muted) !important; font-size: .86rem; font-weight: 500; }
.navbar__link:hover, .navbar__link--active { color: #5eead4 !important; } .navbar__link:hover, .navbar__link--active { color: var(--portal-accent) !important; }
.navbar-sidebar { background: #08101b !important; } .navbar-sidebar { background: var(--portal-sidebar-bg) !important; }
.footer { background: #050b12 !important; border-top: 1px solid #283345; } .footer { background: var(--portal-footer-bg) !important; border-top: 1px solid var(--portal-border); color: var(--portal-footer-muted); }
.footer__title { color: #f5f7fa; letter-spacing: .04em; } .footer__title { color: var(--portal-footer-ink); letter-spacing: .04em; }
.footer__link-item { color: #a5b0c2; } .footer__link-item, .footer__copyright { color: var(--portal-footer-muted); }
.footer__link-item:hover { color: #5eead4; } .footer__link-item:hover { color: var(--portal-accent); }
.theme-doc-markdown h1, .theme-doc-markdown h1,
.theme-doc-markdown h2, .theme-doc-markdown h2,
.theme-doc-markdown h3 { letter-spacing: -.025em; } .theme-doc-markdown h3 { letter-spacing: -.025em; }
.theme-doc-sidebar-container { border-right-color: #283345 !important; } .theme-doc-sidebar-container { border-right-color: var(--portal-border) !important; }
.menu__link { font-size: .9rem; } .menu__link { font-size: .9rem; }
.menu__link--active { background: rgba(94, 234, 212, .08) !important; } .menu__link--active { background: var(--portal-active-bg) !important; }
.table-of-contents__link--active { color: #5eead4; } .table-of-contents__link--active { color: var(--portal-accent); }
.button, code, pre, .card, .alert, .pagination-nav__link, .menu, .button, code, pre, .card, .alert, .pagination-nav__link, .menu,
input, select, textarea, details, summary, table, .dropdown__menu, input, select, textarea, details, summary, table, .dropdown__menu,
+41 -10
View File
@@ -4,11 +4,42 @@
--portal-line: #283345; --portal-line: #283345;
--portal-panel: #101722; --portal-panel: #101722;
--portal-panel-strong: #151e2c; --portal-panel-strong: #151e2c;
--portal-canvas: #08101b;
--portal-hero-start: #08101b;
--portal-hero-middle: #0b1522;
--portal-hero-end: #0c1a26;
--portal-grid-glow: rgba(19, 185, 170, .13);
--portal-rail-bg: rgba(8, 16, 27, .88);
--portal-rail-muted: #748196;
--portal-secondary-border: #4a5669;
--portal-cta-bg: #0d1724;
--portal-accent: #5eead4; --portal-accent: #5eead4;
background: #08101b; --portal-button-ink: #06110f;
--portal-button-hover: #99f6e4;
background: var(--portal-canvas);
color: var(--portal-ink); color: var(--portal-ink);
} }
:global([data-theme='light']) .page {
--portal-ink: #111827;
--portal-muted: #526174;
--portal-line: #cdd5df;
--portal-panel: #ffffff;
--portal-panel-strong: #edf5f4;
--portal-canvas: #f7f9fb;
--portal-hero-start: #f7f9fb;
--portal-hero-middle: #edf4f4;
--portal-hero-end: #e4efef;
--portal-grid-glow: rgba(15, 118, 110, .15);
--portal-rail-bg: rgba(255, 255, 255, .90);
--portal-rail-muted: #637083;
--portal-secondary-border: #8793a3;
--portal-cta-bg: #e9f1f1;
--portal-accent: #0f766e;
--portal-button-ink: #ffffff;
--portal-button-hover: #115e59;
}
.hero { .hero {
min-height: 700px; min-height: 700px;
position: relative; position: relative;
@@ -17,8 +48,8 @@
align-items: center; align-items: center;
border-bottom: 1px solid var(--portal-line); border-bottom: 1px solid var(--portal-line);
background: background:
radial-gradient(circle at 78% 22%, rgba(19, 185, 170, .13), transparent 28%), radial-gradient(circle at 78% 22%, var(--portal-grid-glow), transparent 28%),
linear-gradient(125deg, #08101b 0%, #0b1522 62%, #0c1a26 100%); linear-gradient(125deg, var(--portal-hero-start) 0%, var(--portal-hero-middle) 62%, var(--portal-hero-end) 100%);
} }
.gridTexture { .gridTexture {
@@ -90,17 +121,17 @@
} }
.primaryAction { .primaryAction {
color: #06110f !important; color: var(--portal-button-ink) !important;
background: var(--portal-accent); background: var(--portal-accent);
border-color: var(--portal-accent); border-color: var(--portal-accent);
} }
.primaryAction:hover { background: #99f6e4; border-color: #99f6e4; } .primaryAction:hover { background: var(--portal-button-hover); border-color: var(--portal-button-hover); }
.secondaryAction { .secondaryAction {
color: var(--portal-ink) !important; color: var(--portal-ink) !important;
background: transparent; background: transparent;
border-color: #4a5669; border-color: var(--portal-secondary-border);
} }
.secondaryAction:hover { border-color: var(--portal-accent); color: var(--portal-accent) !important; } .secondaryAction:hover { border-color: var(--portal-accent); color: var(--portal-accent) !important; }
@@ -116,14 +147,14 @@
grid-template-columns: repeat(4, auto); grid-template-columns: repeat(4, auto);
border-top: 1px solid var(--portal-line); border-top: 1px solid var(--portal-line);
border-left: 1px solid var(--portal-line); border-left: 1px solid var(--portal-line);
background: rgba(8, 16, 27, .88); background: var(--portal-rail-bg);
} }
.heroRail span { .heroRail span {
padding: 17px 25px; padding: 17px 25px;
border-right: 1px solid var(--portal-line); border-right: 1px solid var(--portal-line);
font-family: var(--ifm-font-family-monospace); font-family: var(--ifm-font-family-monospace);
color: #748196; color: var(--portal-rail-muted);
font-size: .67rem; font-size: .67rem;
letter-spacing: .12em; letter-spacing: .12em;
} }
@@ -164,7 +195,7 @@
.cardHeader { flex: 1; min-height: 310px; padding: 36px; } .cardHeader { flex: 1; min-height: 310px; padding: 36px; }
.cardHeader h2 { font-size: 2.1rem; letter-spacing: -.035em; margin: 0 0 18px; } .cardHeader h2 { font-size: 2.1rem; letter-spacing: -.035em; margin: 0 0 18px; }
.cardHeader p { color: var(--portal-muted); line-height: 1.65; margin: 0; } .cardHeader p { color: var(--portal-muted); line-height: 1.65; margin: 0; }
.eyebrow { margin-bottom: 46px; color: #718096; } .eyebrow { margin-bottom: 46px; color: var(--portal-rail-muted); }
.cardLinks { border-top: 1px solid var(--portal-line); } .cardLinks { border-top: 1px solid var(--portal-line); }
.cardLink { .cardLink {
@@ -213,7 +244,7 @@
gap: 40px; gap: 40px;
border: 1px solid var(--portal-line); border: 1px solid var(--portal-line);
border-bottom: 0; border-bottom: 0;
background: #0d1724; background: var(--portal-cta-bg);
} }
.cta .kicker { margin-bottom: 16px; } .cta .kicker { margin-bottom: 16px; }