Skip to content

Commit

Permalink
docs(plugin-catalog): fix catalog docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Mister-Hope committed Feb 27, 2024
1 parent e732ba2 commit 2221994
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 14 deletions.
10 changes: 3 additions & 7 deletions docs/plugins/catalog.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,9 @@ You can then import `defineCatalogInfoGetter` from `@vuepress/plugin-catalog/cli
```js title=".vuepress/client.js"
import { defineCatalogInfoGetter } from '@vuepress/plugin-catalog/client'

export default {
setup: () => {
defineCatalogInfoGetter((meta) =>
meta.title ? { title: meta.title } : null,
)
},
}
defineCatalogInfoGetter((meta) => (meta.title ? { title: meta.title } : null))

export default {}
```

Catalog info should contains:
Expand Down
10 changes: 3 additions & 7 deletions docs/zh/plugins/catalog.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,9 @@ export default {
```js title=".vuepress/client.js"
import { defineCatalogInfoGetter } from '@vuepress/plugin-catalog/client'

export default {
setup: () => {
defineCatalogInfoGetter((meta) =>
meta.title ? { title: meta.title } : null,
)
},
}
defineCatalogInfoGetter((meta) => (meta.title ? { title: meta.title } : null))

export default {}
```

目录信息应包含:
Expand Down

0 comments on commit 2221994

Please sign in to comment.