diff --git a/.github/workflows/release.yml b/.github/workflows/deploy-docs.yml similarity index 87% rename from .github/workflows/release.yml rename to .github/workflows/deploy-docs.yml index 8552409..4bf03be 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/deploy-docs.yml @@ -1,9 +1,10 @@ -name: release +name: Deploy Documents on: push: branches: - main + - feat/init jobs: deploy: @@ -24,6 +25,9 @@ jobs: - name: Install dependencies run: pnpm install + - name: Build Docs + run: pnpm build:docs + - name: Deploy uses: peaceiris/actions-gh-pages@v3 with: diff --git a/docs/.vitepress/config/en.ts b/docs/.vitepress/config/en.ts index d10c10b..6d61c89 100644 --- a/docs/.vitepress/config/en.ts +++ b/docs/.vitepress/config/en.ts @@ -8,16 +8,16 @@ export const en = defineConfig({ nav: [ { text: 'Guide', - link: '/en/guide/feature', - activeMatch: '/en/guide/', + link: '/guide/feature', + activeMatch: '/guide/', }, - { text: 'Vue', link: '/en/vue' }, - { text: 'Vue2', link: '/en/vue2' }, - { text: 'React', link: '/en/react' }, + { text: 'Vue', link: '/vue' }, + { text: 'Vue2', link: '/vue2' }, + { text: 'React', link: '/react' }, ], sidebar: { - '/guide/': { base: '/en/guide/', items: sidebarGuide() }, + '/guide/': { base: '/guide/', items: sidebarGuide() }, }, footer: { message: 'Released under the MIT License.', diff --git a/docs/.vitepress/config/shared.ts b/docs/.vitepress/config/shared.ts index be2628f..fada9f5 100644 --- a/docs/.vitepress/config/shared.ts +++ b/docs/.vitepress/config/shared.ts @@ -3,6 +3,8 @@ import { defineConfig } from 'vitepress'; export const shared = defineConfig({ title: 'virtual-list-core', lastUpdated: true, + cleanUrls: true, + metaChunk: true, rewrites: { 'en/:rest*': ':rest*', diff --git a/docs/.vitepress/config/zh.ts b/docs/.vitepress/config/zh.ts index e238ff3..420bb5c 100644 --- a/docs/.vitepress/config/zh.ts +++ b/docs/.vitepress/config/zh.ts @@ -11,9 +11,9 @@ export const zh = defineConfig({ link: '/zh/guide/feature', activeMatch: '/zh/guide/', }, - { text: 'Vue', link: '/en/vue' }, - { text: 'Vue2', link: '/en/vue2' }, - { text: 'React', link: '/en/react' }, + { text: 'Vue', link: '/zh/vue' }, + { text: 'Vue2', link: '/zh/vue2' }, + { text: 'React', link: '/zh/react' }, ], sidebar: { diff --git a/docs/en/index.md b/docs/en/index.md index ca1a37b..c1c2038 100644 --- a/docs/en/index.md +++ b/docs/en/index.md @@ -8,10 +8,10 @@ hero: actions: - theme: brand text: Guide - link: /guide/markdown-examples + link: /guide/feature - theme: alt text: Quick Start - link: /guide/api-examples + link: /guide/getting-started - theme: alt text: Github link: https://github.com/apathiaX/virtual-list diff --git a/docs/zh/index.md b/docs/zh/index.md index 8ab7682..2b5b101 100644 --- a/docs/zh/index.md +++ b/docs/zh/index.md @@ -8,10 +8,10 @@ hero: actions: - theme: brand text: 指南 - link: /guide/markdown-examples + link: /zh/guide/feature - theme: alt text: 快速开始 - link: /guide/api-examples + link: /zh/guide/getting-started - theme: alt text: Github link: https://github.com/apathiaX/virtual-list