Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(breadcrumbs): fix twoslash error when build docs #353

Merged
merged 2 commits into from
Nov 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.