[DOCS] Restore dev-version banner gate after VitePress migration (#2305)
The VuePress->VitePress migration replaced the `themeConfig.mode === 'dev'` gate with a heuristic on `site.title`. CI overrides version with a short SHA (dev) or git tag (prod), so the title never contains "edge"/"dev" and the banner never renders on live deploys. Surface `meta.mode` in `themeConfig` and check it directly, mirroring the original behaviour. Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
ddd05ebe50
commit
9e93e37506
2 files changed
+16
-3
No files matched your search
@@ -32,6 +32,12 @@ export default defineConfig({
|
||||
},
|
||||
themeConfig: {
|
||||
siteTitle: 'OpenMQTTGateway',
|
||||
// @ts-expect-error custom fields consumed by index.md to render the dev-version banner
|
||||
mode: meta.mode,
|
||||
// @ts-expect-error
|
||||
version: meta.version,
|
||||
// @ts-expect-error
|
||||
repo: meta.theme_config_repo,
|
||||
nav: commonNav,
|
||||
socialLinks: [
|
||||
{ icon: 'github', link: `https://github.com/${meta.theme_config_repo}` }
|
||||
|
||||
Reference in new issue
Block a user