From 037575b244d1df7c6339889091d08537b33e7c8b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Levilain?= Date: Mon, 23 Oct 2023 14:01:36 +0200 Subject: [PATCH] docs: fix header dead link --- docs/src/.vitepress/config.mts | 97 ++++++++++++++++++---------------- 1 file changed, 50 insertions(+), 47 deletions(-) diff --git a/docs/src/.vitepress/config.mts b/docs/src/.vitepress/config.mts index 8800b6b5..3e18bb55 100644 --- a/docs/src/.vitepress/config.mts +++ b/docs/src/.vitepress/config.mts @@ -1,4 +1,5 @@ import { defineConfig } from 'vitepress'; +import { DefaultTheme } from 'vitepress/types/default-theme'; const websiteUrl = 'https://shulker.jeremylvln.fr'; const repositoryUrl = 'https://github.com/jeremylvln/Shulker'; @@ -9,6 +10,52 @@ const description = const renderTitle = (title: string) => titleTemplate.replace(':title', title); +const sidebar = { + '/guide/': [ + { + text: 'Introduction', + items: [ + { text: 'What is Shulker?', link: '/guide/' }, + { text: 'Architecture', link: '/guide/architecture' }, + ], + }, + { + text: 'Getting Started', + items: [ + { + text: 'Prerequisites', + link: '/guide/getting-started/prerequisites', + }, + { + text: 'Installation', + link: '/guide/getting-started/installation', + }, + { + text: 'Your First Cluster', + link: '/guide/getting-started/your-first-cluster', + }, + ], + }, + { + text: 'Recipes', + items: [ + { + text: 'Adding custom content', + link: '/guide/recipes/adding-custom-content', + }, + { + text: 'Enabling proxy protocol', + link: '/guide/recipes/enabling-proxy-protocol', + }, + { + text: 'Overriding pod properties', + link: '/guide/recipes/overriding-pod-properties', + }, + ], + }, + ], +} satisfies DefaultTheme.SidebarMulti; + export default defineConfig({ title: 'Shulker', titleTemplate, @@ -89,55 +136,11 @@ export default defineConfig({ socialLinks: [{ icon: 'github', link: repositoryUrl }], nav: [ - { text: 'Getting Started', link: '/guide/getting-started/prerequisites' }, + { text: 'Getting Started', link: sidebar['/guide/'][1].items[0].link }, { text: 'Guide', link: '/guide/' }, - { text: 'Recipes', link: '/guide/recipes' }, + { text: 'Recipes', link: sidebar['/guide/'][2].items[0].link }, ], - sidebar: { - '/guide/': [ - { - text: 'Introduction', - items: [ - { text: 'What is Shulker?', link: '/guide/' }, - { text: 'Architecture', link: '/guide/architecture' }, - ], - }, - { - text: 'Getting Started', - items: [ - { - text: 'Prerequisites', - link: '/guide/getting-started/prerequisites', - }, - { - text: 'Installation', - link: '/guide/getting-started/installation', - }, - { - text: 'Your First Cluster', - link: '/guide/getting-started/your-first-cluster', - }, - ], - }, - { - text: 'Recipes', - items: [ - { - text: 'Adding custom content', - link: '/guide/recipes/adding-custom-content', - }, - { - text: 'Enabling proxy protocol', - link: '/guide/recipes/enabling-proxy-protocol', - }, - { - text: 'Overriding pod properties', - link: '/guide/recipes/overriding-pod-properties', - }, - ], - }, - ], - }, + sidebar, }, });