Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update docs build to create multi-version builds. #259

Merged
merged 3 commits into from
Oct 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .github/workflows/pr-docs-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@ jobs:
# Install deps and cache
- name: Checkout code
uses: actions/checkout@v4
- name: Cache version builds
uses: actions/cache@v4
with:
key: lando-mvb-docs
path: docs/.vitepress/cache/@lando/mvb
save-always: true
- name: Install node ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
Expand All @@ -27,5 +33,7 @@ jobs:
# Run tests
- name: Run linter
run: npm run lint
- name: Test mvb
run: npm run docs:mvb
- name: Test build
run: npm run docs:build
3 changes: 3 additions & 0 deletions docs/.vitepress/config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ export default defineConfig({
['link', {rel: 'icon', href: '/pantheon/favicon.svg', type: 'image/svg+xml'}],
],
themeConfig: {
multiVersionBuild: {
satisfies: '>=1.0.0',
},
sidebar: sidebar(),
},
});
Expand Down
40 changes: 40 additions & 0 deletions docs/v/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
---
description: All Other documentation versions
title: Docuverse
contributors: false
lastUpdated: false
editLink: false
next: false
prev: false
---
# Docuverse

<br />
<br />

<div
v-for="link in links"
:key="link.text"
class="version-link"
>
<VPLVersionLink
:text="link.text"
:href="link.href"
:prerelease="link.prerelease"
:stable="link.stable"
:edge="link.edge"
/>
</div>

<br />

<div>
<VPLVersionLink :dev="true" :text="aliases.dev" :href="aliasLinks.dev" />
</div>

<script setup>
import {useTags} from '@lando/vitepress-theme-default-plus';
import {VPLCollectionPage, VPLCollectionPageSection, VPLCollectionPageTitle, VPLVersionLink} from '@lando/vitepress-theme-default-plus';

const {aliases, aliasLinks, links} = useTags();
</script>
23 changes: 15 additions & 8 deletions netlify.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,21 @@
[build]
base = "./"
publish = "docs/.vitepress/dist"
command = "npm run docs:mvb"

[context.deploy-preview]
command = "npm run docs:build"

# https://github.com/munter/netlify-plugin-checklinks#readme
[[context.deploy-preview.plugins]]
package = "netlify-plugin-checklinks"
[context.deploy-preview.plugins.inputs]
todoPatterns = [ "load", "CHANGELOG.html", "x.com", "twitter.com", "/v/" ]
skipPatterns = [ ".rss", ".gif", ".jpg" ]
checkExternal = true



# Sets our asset optimization
[build.processing.css]
bundle = true
Expand All @@ -28,13 +41,7 @@
[plugins.inputs.audits]
output_path = "reports/lighthouse.html"

# https://github.com/munter/netlify-plugin-checklinks#readme
[[plugins]]
package = "netlify-plugin-checklinks"
[plugins.inputs]
todoPatterns = [ "load", "CHANGELOG.html", "x.com", "twitter.com" ]
skipPatterns = [ ".rss", ".gif", ".jpg" ]
checkExternal = true


# We need this so preview environments and the base site look ok on their own
[[redirects]]
Expand All @@ -44,4 +51,4 @@
[[redirects]]
from = "/plugins/pantheon/*"
to = "/:splat"
status = 200
status = 200
Loading
Loading