diff --git a/docs/.vitepress/config.mts b/docs/.vitepress/config.mts index a1be7e6..e8ce54d 100644 --- a/docs/.vitepress/config.mts +++ b/docs/.vitepress/config.mts @@ -1,4 +1,6 @@ import { defineConfig } from 'vitepress' +import { sidebar } from '../sidebar.mts' +import { nav } from '../nav.mts' // https://vitepress.dev/reference/site-config export default defineConfig({ @@ -15,20 +17,9 @@ export default defineConfig({ src: '/public/assets/logo.svg', }, - nav: [ - { text: 'Home', link: '/' }, - { text: 'Examples', link: '/markdown-examples' } - ], + nav: nav, - sidebar: [ - { - text: 'Examples', - items: [ - { text: 'Markdown Examples', link: '/markdown-examples' }, - { text: 'Runtime API Examples', link: '/api-examples' } - ] - } - ], + sidebar: sidebar, socialLinks: [ { icon: 'github', link: 'https://github.com/vuejs/vitepress' } diff --git a/docs/nav.mts b/docs/nav.mts new file mode 100644 index 0000000..f75a75c --- /dev/null +++ b/docs/nav.mts @@ -0,0 +1,6 @@ +import { DefaultTheme } from 'vitepress' + +export const nav: DefaultTheme.NavItem[] = [ + { text: 'Home', link: '/' }, + { text: 'Examples', link: '/markdown-examples' } +] \ No newline at end of file diff --git a/docs/sidebar.mts b/docs/sidebar.mts new file mode 100644 index 0000000..5d58af3 --- /dev/null +++ b/docs/sidebar.mts @@ -0,0 +1,11 @@ +import { DefaultTheme } from 'vitepress' + +export const sidebar: DefaultTheme.Sidebar = [ + { + text: 'Examples', + items: [ + { text: 'Markdown Examples', link: '/markdown-examples' }, + { text: 'Runtime API Examples', link: '/api-examples' } + ] + } +] \ No newline at end of file