Skip to content

Commit 23be14e

Browse files
committed
docs: configure basic typedoc generation
1 parent b7afdcc commit 23be14e

File tree

15 files changed

+814
-6478
lines changed

15 files changed

+814
-6478
lines changed

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,13 @@ node_modules
88
.vscode
99
debug.log
1010
.eslintcache
11+
12+
# VitePress related
1113
**/.vitepress/cache
14+
docs/api/general
15+
docs/api/vue
16+
docs/api/index.md
17+
!docs/api/typedoc-sidebar.json
1218

1319
*.log
1420
*.swp

docs/.vitepress/config.mts

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1-
import type { HeadConfig } from 'vitepress'
21
import { defineConfig } from 'vitepress'
32
import llmstxt from 'vitepress-plugin-llms'
3+
import typedocSidebarApi from '../api/typedoc-sidebar.json' with { type: 'json' }
4+
5+
import type { HeadConfig } from 'vitepress'
46

57
const head: HeadConfig[] = [['link', { rel: 'icon', href: '/vue-i18n-logo.png' }]]
68

@@ -48,13 +50,12 @@ export default defineConfig({
4850

4951
nav: nav(),
5052

51-
sidebar: {
52-
'/guide/': sidebarGuide(),
53-
'/api/': sidebarApi(),
54-
// NOTE: if we need to support multiple versions, we can be enble the following sidebar items
55-
// '/api/v11/': sidebarApi('v11/'),
56-
'/ecosystem/': sidebarEcosystem()
57-
}
53+
sidebar: [
54+
...sidebarGuide(),
55+
...sidebarApi(),
56+
...sidebarEcosystem(),
57+
...sidebarApiV11('v11/'),
58+
]
5859
}
5960
})
6061

@@ -250,10 +251,10 @@ function sidebarGuide() {
250251
]
251252
}
252253

253-
function sidebarApi(ns = '') {
254+
function sidebarApiV11(ns = '') {
254255
return [
255256
{
256-
text: 'API Reference',
257+
text: 'API Reference v11',
257258
items: [
258259
{
259260
text: 'General',
@@ -283,6 +284,15 @@ function sidebarApi(ns = '') {
283284
}
284285
]
285286
}
287+
288+
function sidebarApi() {
289+
return [{
290+
text: 'API Reference',
291+
collapsed: false,
292+
items: typedocSidebarApi
293+
}]
294+
}
295+
286296
function sidebarEcosystem() {
287297
return [
288298
{

docs/api/component.md

Lines changed: 0 additions & 279 deletions
This file was deleted.

0 commit comments

Comments
 (0)