Skip to content

Commit c61c895

Browse files
authored
Migrate Docs to VitePress (#293)
1 parent 63f80cb commit c61c895

File tree

24 files changed

+4553
-125
lines changed

24 files changed

+4553
-125
lines changed

.github/workflows/publish-docs.yml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: Deploy VitePress site to Pages
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
types: [assigned, opened, synchronize, reopened]
8+
workflow_dispatch:
9+
10+
permissions:
11+
contents: read
12+
pages: write
13+
id-token: write
14+
15+
concurrency:
16+
group: pages
17+
cancel-in-progress: false
18+
19+
jobs:
20+
build:
21+
name: Run docs build
22+
runs-on: ubuntu-latest
23+
steps:
24+
- name: Checkout
25+
uses: actions/checkout@v6
26+
with:
27+
fetch-depth: 0
28+
- name: Setup Node
29+
uses: actions/setup-node@v6
30+
with:
31+
node-version: 24
32+
cache: npm
33+
- name: Setup Pages
34+
uses: actions/configure-pages@v5
35+
- name: Install dependencies
36+
run: npm ci
37+
- name: Build with VitePress
38+
run: npm run docs:build
39+
- name: Upload artifact
40+
uses: actions/upload-pages-artifact@v4
41+
with:
42+
path: docs/.vitepress/dist
43+
if: github.event_name != 'pull_request'
44+
45+
deploy:
46+
if: github.event_name != 'pull_request'
47+
environment:
48+
name: github-pages
49+
url: ${{ steps.deployment.outputs.page_url }}
50+
needs: build
51+
runs-on: ubuntu-latest
52+
name: Run docs publish
53+
steps:
54+
- name: Deploy to GitHub Pages
55+
id: deployment
56+
uses: actions/deploy-pages@v4
57+

.github/workflows/publish_docs.yaml

Lines changed: 0 additions & 33 deletions
This file was deleted.

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,8 @@ vendor/
3030
*.swp
3131
*.swo
3232
*~
33+
34+
# Node / VitePress
35+
node_modules/
36+
docs/.vitepress/cache/
37+
docs/.vitepress/dist/

Makefile

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@
22
# Image URL to use all building/pushing image targets
33
IMG ?= controller:latest
44

5-
# Docker image name for the mkdocs based local development setup
6-
IMAGE=ironcore-dev/boot-operator-docs
5+
# Docker image name for the VitePress based local development setup
6+
DOCS_IMAGE ?= ironcore-dev/boot-operator-docs
7+
DOCS_PORT ?= 5173
78

89
# Get the currently used golang install path (in GOPATH/bin, unless GOBIN is set)
910
ifeq (,$(shell go env GOBIN))
@@ -237,13 +238,21 @@ $(GOLANGCI_LINT): $(LOCALBIN)
237238

238239

239240
.PHONY: startdocs
240-
startdocs: ## Start the local mkdocs based development environment.
241-
docker build -t $(IMAGE) -f docs/Dockerfile . --load
242-
docker run -p 8000:8000 -v `pwd`/:/docs $(IMAGE)
241+
startdocs: ## Start the local VitePress based development environment.
242+
@# When users have `docker build` forwarded to buildx (via `docker buildx install`),
243+
@# the resulting image may remain only in the build cache unless `--load` is used.
244+
@# Prefer `buildx --load` when available to keep `$(CONTAINER_TOOL) run $(DOCS_IMAGE)` working.
245+
@if $(CONTAINER_TOOL) buildx version >/dev/null 2>&1; then \
246+
$(CONTAINER_TOOL) buildx build --load -t $(DOCS_IMAGE) -f docs/Dockerfile .; \
247+
else \
248+
$(CONTAINER_TOOL) build -t $(DOCS_IMAGE) -f docs/Dockerfile .; \
249+
fi
250+
$(CONTAINER_TOOL) run --rm -p $(DOCS_PORT):5173 -v "$(shell pwd)":/app $(DOCS_IMAGE)
243251

244252
.PHONY: cleandocs
245-
cleandocs: ## Remove all local mkdocs Docker images (cleanup).
246-
docker container prune --force --filter "label=project=boot_operator"
253+
cleandocs: ## Cleanup local docs Docker artifacts (image + dangling layers).
254+
-$(CONTAINER_TOOL) image rm --force $(DOCS_IMAGE)
255+
-$(CONTAINER_TOOL) image prune --force --filter "label=project=boot_operator"
247256

248257
.PHONY: addlicense
249258
addlicense: $(ADDLICENSE) ## Download addlicense locally if necessary.

REUSE.toml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,12 @@ path = [
2727
"test/**",
2828
"CONTRIBUTING.md",
2929
"PROJECT",
30-
"mkdocs.yml",
3130
".dockerignore",
3231
".golangci.yml",
3332
"CLAUDE.md",
34-
"REUSE.toml"
33+
"REUSE.toml",
34+
"package-lock.json",
35+
"package.json"
3536
]
3637
precedence = "aggregate"
3738
SPDX-FileCopyrightText = "2025 SAP SE or an SAP affiliate company and IronCore contributors"

docs/.vitepress/config.mts

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
import { withMermaid } from "vitepress-plugin-mermaid";
2+
import { fileURLToPath, URL } from "node:url";
3+
4+
export default withMermaid({
5+
title: "Boot Operator",
6+
description: "Kubernetes operator to automate bare metal network boot infrastructure",
7+
base: "/boot-operator/",
8+
head: [
9+
[
10+
"link",
11+
{
12+
rel: "icon",
13+
href: "https://raw.githubusercontent.com/ironcore-dev/ironcore/refs/heads/main/docs/assets/logo_borderless.svg",
14+
},
15+
],
16+
],
17+
vite: {
18+
resolve: {
19+
alias: [
20+
{
21+
// Override default theme footer with our funding notice.
22+
find: /^.*\/VPFooter\.vue$/,
23+
replacement: fileURLToPath(
24+
new URL("./theme/components/VPFooter.vue", import.meta.url),
25+
),
26+
},
27+
],
28+
},
29+
},
30+
themeConfig: {
31+
nav: [
32+
{ text: "Home", link: "/" },
33+
{ text: "Documentation", link: "/architecture" },
34+
{ text: "Quickstart", link: "/quickstart" },
35+
{ text: "IronCore Documentation", link: "https://ironcore-dev.github.io" },
36+
],
37+
38+
editLink: {
39+
pattern: "https://github.com/ironcore-dev/boot-operator/blob/main/docs/:path",
40+
text: "Edit this page on GitHub",
41+
},
42+
43+
logo: {
44+
src: "https://raw.githubusercontent.com/ironcore-dev/ironcore/refs/heads/main/docs/assets/logo_borderless.svg",
45+
width: 24,
46+
height: 24,
47+
},
48+
49+
search: {
50+
provider: "local",
51+
},
52+
53+
sidebar: [
54+
{
55+
items: [
56+
{ text: "Quickstart", link: "/quickstart" },
57+
{
58+
text: "Installation",
59+
collapsed: true,
60+
items: [
61+
{ text: "Kustomize", link: "/installation/kustomize" },
62+
{ text: "Helm", link: "/installation/helm" },
63+
],
64+
},
65+
{ text: "Architecture", link: "/architecture" },
66+
{ text: "API Reference", link: "/api-reference/api" },
67+
],
68+
},
69+
{
70+
text: "Usage",
71+
collapsed: false,
72+
items: [{ text: "bootctl", link: "/usage/bootctl" }],
73+
},
74+
{
75+
text: "Development",
76+
collapsed: false,
77+
items: [
78+
{ text: "Documentation", link: "/development/dev_docs" },
79+
{ text: "Create UKI", link: "/development/create_uki" },
80+
],
81+
},
82+
],
83+
84+
socialLinks: [
85+
{ icon: "github", link: "https://github.com/ironcore-dev/boot-operator" },
86+
],
87+
},
88+
});
89+

0 commit comments

Comments
 (0)