Skip to content

Commit f29efdd

Browse files
committed
Switch from mdBook to VitePress
1 parent 6b69c67 commit f29efdd

50 files changed

Lines changed: 2293 additions & 66 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Generate Markdown Book
1+
name: Generate static documentation page
22

33
on:
44
push:
@@ -26,18 +26,26 @@ jobs:
2626
steps:
2727
- name: Checkout
2828
uses: actions/checkout@v4
29+
with:
30+
fetch-depth: 0
31+
32+
- name: Setup Node
33+
uses: actions/setup-node@v4
34+
with:
35+
node-version: 22
36+
cache: npm
2937

30-
- name: Install mdBook
31-
run: cargo install mdbook
38+
- name: Install dependencies
39+
run: npm ci
3240

33-
- name: Build markdown book
34-
run: mdbook build docs
41+
- name: Build with VitePress
42+
run: npm run docs:build
3543

3644
- name: Upload artifact
3745
id: deployment
3846
uses: actions/upload-pages-artifact@v3
3947
with:
40-
path: docs/book
48+
path: .vitepress/dist
4149

4250
# Deployment job
4351
deploy:

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
node_modules
2+
build
3+
npm-debug.log
4+
.env
5+
.vitepress/**
6+
!.vitepress/config.mts

.vitepress/config.mts

Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
import { defineConfig } from 'vitepress'
2+
3+
// https://vitepress.dev/reference/site-config
4+
export default defineConfig({
5+
srcDir: "docs",
6+
7+
title: 'Vehicle Registry',
8+
description: "NeTEx based data structure definition for a national vehicle registry. ",
9+
lang: 'en-GB',
10+
themeConfig: {
11+
// https://vitepress.dev/reference/default-theme-config
12+
sidebar: [
13+
{
14+
text: 'Building Blocks',
15+
items: [
16+
{ text: 'General', link: '/GENERAL.md' },
17+
{ text: 'Vehicle Model', link: '/VEHICLE_MODEL.md' },
18+
{ text: 'Vehicle Type', link: '/VEHICLE_TYPE.md' },
19+
{ text: 'Vehicle Equipment Profile', link: '/VEHICLE_EQUIPMENT_PROFILE.md' },
20+
{
21+
text: 'Equipment',
22+
link: '/EQUIPMENT/EQUIPMENT.md',
23+
collapsed: true,
24+
items: [
25+
{ text: 'Seat Equipment', link: '/EQUIPMENT/SEAT_EQUIPMENT.md' },
26+
{ text: 'Luggage Spot Equipment', link: '/EQUIPMENT/LUGGAGE_SPOT_EQUIPMENT.md' },
27+
{ text: 'Bed Equipment', link: '/EQUIPMENT/BED_EQUIPMENT.md' },
28+
{ text: 'Access Vehicle Equipment', link: '/EQUIPMENT/ACCESS_VEHICLE_EQUIPMENT.md' },
29+
{ text: 'Ramp Vehicle Equipment', link: '/EQUIPMENT/RAMP_VEHICLE_EQUIPMENT.md' },
30+
{ text: 'Hoist Vehicle Equipment', link: '/EQUIPMENT/HOIST_VEHICLE_EQUIPMENT.md' },
31+
{ text: 'Retractable Step Vehicle Equipment', link: '/EQUIPMENT/RETRACTABLE_STEP_VEHICLE_EQUIPMENT.md' },
32+
{ text: 'Staircase Equipment', link: '/EQUIPMENT/STAIRCASE_EQUIPMENT.md' },
33+
{ text: 'Entrance Equipment', link: '/EQUIPMENT/ENTRANCE_EQUIPMENT.md' },
34+
{ text: 'Sanitary Equipment', link: '/EQUIPMENT/SANITARY_EQUIPMENT.md' },
35+
{ text: 'Ticketing Equipment', link: '/EQUIPMENT/TICKETING_EQUIPMENT.md' },
36+
{ text: 'Ticket Validator Equipment', link: '/EQUIPMENT/TICKET_VALIDATOR_EQUIPMENT.md' },
37+
{ text: 'Passenger Information Equipment', link: '/EQUIPMENT/PASSENGER_INFORMATION_EQUIPMENT.md' },
38+
{ text: 'Passenger Safety Equipment', link: '/EQUIPMENT/PASSENGER_SAFETY_EQUIPMENT.md' },
39+
{ text: 'Help Point Equipment', link: '/EQUIPMENT/HELP_POINT_EQUIPMENT.md' },
40+
{ text: 'Rubbish Disposal Equipment', link: '/EQUIPMENT/RUBBISH_DISPOSAL_EQUIPMENT.md' },
41+
{ text: 'Place Lighting', link: '/EQUIPMENT/PLACE_LIGHTING.md' }
42+
]
43+
},
44+
{
45+
text: 'Deck Plan',
46+
link: '/DECK_PLAN/DECK_PLAN.md',
47+
items: [
48+
{ text: 'Deck', link: '/DECK_PLAN/DECK.md' },
49+
{ text: 'Deck Level', link: '/DECK_PLAN/DECK_LEVEL.md' },
50+
{
51+
text: 'Deck Space',
52+
link: '/DECK_PLAN/DECK_SPACE/DECK_SPACE.md',
53+
collapsed: true,
54+
items: [
55+
{ text: 'Other Deck Space', link: '/DECK_PLAN/DECK_SPACE/OTHER_DECK_SPACE.md' },
56+
{ text: 'Passenger Space', link: '/DECK_PLAN/DECK_SPACE/PASSENGER_SPACE.md' }
57+
]
58+
},
59+
{
60+
text: 'Deck Entrance',
61+
link: '/DECK_PLAN/DECK_ENTRANCE/DECK_ENTRANCE.md',
62+
collapsed: true,
63+
items: [
64+
{ text: 'Passenger Entrance', link: '/DECK_PLAN/DECK_ENTRANCE/PASSENGER_ENTRANCE.md' },
65+
{ text: 'Other Deck Entrance', link: '/DECK_PLAN/DECK_ENTRANCE/OTHER_DECK_ENTRANCE.md' },
66+
{ text: 'Deck Vehicle Entrance', link: '/DECK_PLAN/DECK_ENTRANCE/DECK_VEHICLE_ENTRANCE.md' }
67+
]
68+
},
69+
{ text: 'Deck Window', link: '/DECK_PLAN/DECK_WINDOW.md' },
70+
{
71+
text: 'Locatable Spot',
72+
link: '/DECK_PLAN/LOCATABLE_SPOT/LOCATABLE_SPOT.md',
73+
collapsed: true,
74+
items: [
75+
{ text: 'Passenger Spot', link: '/DECK_PLAN/LOCATABLE_SPOT/PASSENGER_SPOT.md' },
76+
{ text: 'Luggage Spot', link: '/DECK_PLAN/LOCATABLE_SPOT/LUGGAGE_SPOT.md' },
77+
{ text: 'Passenger Vehicle Spot', link: '/DECK_PLAN/LOCATABLE_SPOT/PASSENGER_VEHICLE_SPOT.md' }
78+
]
79+
},
80+
{ text: 'Actual Vehicle Equipment', link: '/DECK_PLAN/ACTUAL_VEHICLE_EQUIPMENT.md' },
81+
{ text: 'Accessibility Assessment', link: '/DECK_PLAN/ACCESSIBILITY_ASSESSMENT.md' }
82+
]
83+
}
84+
]
85+
},
86+
{
87+
text: 'Rationales',
88+
items: [
89+
{ text: 'Equipment assignment to vehicle types', link: '/rationales/EQUIPMENT_ASSIGNMENT.md' },
90+
{ text: 'Facilities vs equipment', link: '/rationales/FACILITIES_VS_EQUIPMENT.md' },
91+
{ text: 'DeckSpaces spanning multiple floors', link: '/rationales/DECK_SPACES_ACROSS_LEVELS.md' },
92+
{ text: 'Wheelchair Vehicle Equipment', link: '/rationales/WHEELCHAIR_VEHICLE_EQUIPMENT.md' }
93+
]
94+
}
95+
],
96+
97+
outline: {
98+
level: [2, 3],
99+
label: 'Outline'
100+
},
101+
102+
socialLinks: [
103+
{ icon: 'github', link: 'https://github.com/OPENER-next/VehicleRegistry-DataStructure' }
104+
],
105+
106+
editLink: {
107+
pattern: 'https://github.com/OPENER-next/VehicleRegistry-DataStructure/edit/main/docs/:path',
108+
text: 'Edit this page on GitHub'
109+
},
110+
111+
search: {
112+
provider: 'local'
113+
},
114+
115+
externalLinkIcon: true,
116+
}
117+
})

docs/src/DECK_PLAN/ACCESSIBILITY_ASSESSMENT.md renamed to docs/DECK_PLAN/ACCESSIBILITY_ASSESSMENT.md

Lines changed: 2 additions & 2 deletions

docs/src/DECK_PLAN/DECK_ENTRANCE/DECK_ENTRANCE.md renamed to docs/DECK_PLAN/DECK_ENTRANCE/DECK_ENTRANCE.md

Lines changed: 1 addition & 1 deletion

docs/src/DECK_PLAN/DECK_ENTRANCE/DECK_VEHICLE_ENTRANCE.md renamed to docs/DECK_PLAN/DECK_ENTRANCE/DECK_VEHICLE_ENTRANCE.md

0 commit comments

Comments
 (0)