Skip to content

Commit

Permalink
docs(breadcrumbs): fix twoslash error when build docs (#353)
Browse files Browse the repository at this point in the history
* fix breadcrumbs docs

* update lockfile
  • Loading branch information
LemonNekoGH authored Nov 27, 2024
1 parent af689a8 commit aba075a
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 2 deletions.
3 changes: 3 additions & 0 deletions docs/.vitepress/twoslashConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@ export const compilerOptions = {
'@nolebase/vitepress-plugin-thumbnail-hash/*': [
'../packages/vitepress-plugin-thumbnail-hash/src/*',
],
'@nolebase/vitepress-plugin-breadcrumbs/*': [
'../packages/vitepress-plugin-breadcrumbs/src/*',
],
},
resolveJsonModule: true,
types: [
Expand Down
1 change: 1 addition & 0 deletions docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"@nolebase/ui-asciinema": "workspace:^",
"@nolebase/ui-rive-canvas": "workspace:^",
"@nolebase/unconfig-vitepress": "workspace:^",
"@nolebase/vitepress-plugin-breadcrumbs": "workspace:^",
"@nolebase/vitepress-plugin-enhanced-mark": "workspace:^",
"@nolebase/vitepress-plugin-enhanced-readabilities": "workspace:^",
"@nolebase/vitepress-plugin-git-changelog": "workspace:^",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ In the VitePress configuration file (usually `docs/.vitepress/config.ts`, the fi

```typescript twoslash
import { defineConfig } from 'vitepress'
import { generateBreadcrumbsData } from '@nolebase/vitepress-plugin-breadcrumbs' // [!code ++]
import { generateBreadcrumbsData } from '@nolebase/vitepress-plugin-breadcrumbs/vitepress' // [!code ++]
export default defineConfig({
// Other configurations...
Expand All @@ -67,6 +67,8 @@ Then please add the Breadcrumbs plugin package name `@nolebase/vitepress-plugin-
<!--@include: @/pages/en/snippets/configure-tsconfig.md-->

```typescript twoslash
import { defineConfig } from 'vitepress'

// https://vitepress.dev/reference/site-config
export default defineConfig({
vite: { // [!code ++]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ bun install @nolebase/vitepress-plugin-breadcrumbs

```typescript twoslash
import { defineConfig } from 'vitepress'
import { generateBreadcrumbsData } from '@nolebase/vitepress-plugin-breadcrumbs' // [!code ++]
import { generateBreadcrumbsData } from '@nolebase/vitepress-plugin-breadcrumbs/vitepress' // [!code ++]
export default defineConfig({
// 其它各种配置...
Expand All @@ -67,6 +67,8 @@ export default defineConfig({
<!--@include: @/pages/zh-CN/snippets/configure-tsconfig.md-->

```typescript twoslash
import { defineConfig } from 'vitepress'

// https://vitepress.dev/reference/site-config
export default defineConfig({
vite: { // [!code ++]
Expand Down
3 changes: 3 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit aba075a

Please sign in to comment.