Skip to content

Commit

Permalink
update mvb to edge
Browse files Browse the repository at this point in the history
  • Loading branch information
pirog committed Sep 30, 2024
1 parent b6ba65f commit 43e1c72
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 5 deletions.
27 changes: 25 additions & 2 deletions config/landov3.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import {default as isDevRelease} from '@lando/vitepress-theme-default-plus/is-dev-release';

export default function({landoPlugin, version}) {
const baseUrl = landoPlugin ? `https://docs.lando.dev/${landoPlugin}` : 'https://docs.lando.dev';
const repo = landoPlugin ? `https://github.com/lando/${landoPlugin}` : 'https://github.com/lando';
Expand All @@ -6,11 +8,26 @@ export default function({landoPlugin, version}) {
text: `${landoPlugin}@v${version}`,
collapsed: true,
items: [
{text: 'Release Notes', link: `${repo}/releases/tag/v${version}`},
{text: 'Older Versions', link: `${repo}/releases`},
{
text: 'Other Doc Versions',
items: [
{text: 'stable', target: '_blank', link: '/v/stable/'},
{text: 'edge', target: '_blank', link: '/v/edge/'},
{text: '<strong>see all versions</strong>', link: '/v/'},
],
},
{text: 'Other Releases', link: `${repo}/releases`},
],
} : false;

// add release notes
if (sidebarEnder && !isDevRelease(version)) {
sidebarEnder.items.splice(1, 0, {
text: 'Release Notes',
link: `${repo}/releases/tag/v${version}`,
});
}

return {
base,
collections: {},
Expand Down Expand Up @@ -163,6 +180,12 @@ export default function({landoPlugin, version}) {
},
layouts: {},
logo: {src: '/images/icon.svg', width: 24, height: 24},
multiVersionBuild: {
build: 'stable',
match: 'v[0-9].*',
base: '/v/',
satisfies: '>=1.0.0',
},
nav: [],
sidebar: {},
sidebarEnder,
Expand Down
27 changes: 25 additions & 2 deletions config/landov4.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import {default as isDevRelease} from '@lando/vitepress-theme-default-plus/is-dev-release';

export default function({landoPlugin, version}) {
const baseUrl = landoPlugin ? `https://docs.lando.dev/${landoPlugin}` : 'https://docs.lando.dev';
const repo = landoPlugin ? `https://github.com/lando/${landoPlugin}` : 'https://github.com/lando';
Expand All @@ -6,11 +8,26 @@ export default function({landoPlugin, version}) {
text: `${landoPlugin}@v${version}`,
collapsed: true,
items: [
{text: 'Release Notes', link: `${repo}/releases/tag/v${version}`},
{text: 'Older Versions', link: `${repo}/releases`},
{
text: 'Other Doc Versions',
items: [
{text: 'stable', target: '_blank', link: '/v/stable/'},
{text: 'edge', target: '_blank', link: '/v/edge/'},
{text: '<strong>see all versions</strong>', link: '/v/'},
],
},
{text: 'Other Releases', link: `${repo}/releases`},
],
} : false;

// add release notes
if (sidebarEnder && !isDevRelease(version)) {
sidebarEnder.items.splice(1, 0, {
text: 'Release Notes',
link: `${repo}/releases/tag/v${version}`,
});
}

return {
base,
collections: {},
Expand Down Expand Up @@ -163,6 +180,12 @@ export default function({landoPlugin, version}) {
},
layouts: {},
logo: {src: '/images/icon.svg', width: 24, height: 24},
multiVersionBuild: {
build: 'stable',
match: 'v[0-9].*',
base: '/v/',
satisfies: '>=1.0.0',
},
nav: [],
sidebar: {},
sidebarEnder,
Expand Down
2 changes: 1 addition & 1 deletion docs/.vitepress/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ export default defineConfig({
},
logo: {src: '/images/vitepress-lando-logo-icon.png', width: 24, height: 24},
multiVersionBuild: {
build: 'dev',
build: 'edge',
match: 'v[0-9].*',
base: '/v/',
satisfies: '>=1.0.0-beta.42',
Expand Down

0 comments on commit 43e1c72

Please sign in to comment.