Aggiunta struttura base del sito e configurato vitepress-sidebar

This commit is contained in:
Malasaur 2025-09-14 10:34:17 +02:00
parent 60bcd8950b
commit f9deec80f3
37 changed files with 775 additions and 159 deletions

View file

@ -1,30 +1,64 @@
import { defineConfig } from 'vitepress'
import { withSidebar } from 'vitepress-sidebar'
// https://vitepress.dev/reference/site-config
export default defineConfig({
const vitePressOptions = {
srcDir: "site",
title: "Retards Server",
description: "New Beginning",
themeConfig: {
// https://vitepress.dev/reference/default-theme-config
nav: [
{ text: 'Home', link: '/' },
{ text: 'Examples', link: '/markdown-examples' }
{ text: 'Tutorials', link: '/tutorials/' },
{ text: 'Wiki', link: '/wiki/' },
{ text: 'News', link: '/news/' }
],
sidebar: [
/*sidebar: [
{
target: "/wiki",
text: 'Examples',
items: [
{ text: 'Markdown Examples', link: '/markdown-examples' },
{ text: 'Runtime API Examples', link: '/api-examples' }
]
}
],
],*/
socialLinks: [
{ icon: 'github', link: 'https://github.com/vuejs/vitepress' }
{ icon: 'forgejo', link: 'https://git.brixserver.uk/Malasaur/RetardsServer' }
]
}
})
}
const vitePressSidebarOptions = [
{
documentRootPath: 'site',
scanStartPath: 'news',
resolvePath: '/news/',
useTitleFromFileHeading: true,
collapsed: true,
useFolderTitleFromIndexFile: true,
useFolderLinkFromIndexFile: true
},
{
documentRootPath: 'site',
scanStartPath: 'tutorials',
resolvePath: '/tutorials/',
useTitleFromFileHeading: true,
collapsed: true,
useFolderTitleFromIndexFile: true,
useFolderLinkFromIndexFile: true
},
{
documentRootPath: 'site',
scanStartPath: 'wiki',
resolvePath: '/wiki/',
useTitleFromFileHeading: true,
collapsed: true,
useFolderTitleFromIndexFile: true,
useFolderLinkFromIndexFile: true
}
]
export default defineConfig(withSidebar(vitePressOptions, vitePressSidebarOptions))