From ec9656071ffaeaf9d7c7a48adabb0a20f1ff5ec1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A8=8B=E5=BA=8F=E5=91=98=E5=B0=8F=E5=A2=A8?= Date: Thu, 20 Feb 2025 22:42:46 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B0=86=20nav=20=E5=92=8C=20sidebar=20?= =?UTF-8?q?=E9=85=8D=E7=BD=AE=E7=8B=AC=E7=AB=8B=E5=87=BA=E6=9D=A5=E5=BD=A2?= =?UTF-8?q?=E6=88=90=E5=8D=95=E7=8B=AC=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/.vitepress/config.mts | 17 ++++------------- docs/nav.mts | 6 ++++++ docs/sidebar.mts | 11 +++++++++++ 3 files changed, 21 insertions(+), 13 deletions(-) create mode 100644 docs/nav.mts create mode 100644 docs/sidebar.mts 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