Skip to content

Commit

Permalink
chore: import from dist in docs (#1747)
Browse files Browse the repository at this point in the history
  • Loading branch information
brc-dd authored Dec 31, 2022
1 parent ba97814 commit 3f692dc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
9 changes: 6 additions & 3 deletions docs/.vitepress/config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import { defineConfig } from '../../src/node'
import { version } from '../../package.json'
import { createRequire } from 'module'
import { defineConfig } from 'vitepress'

const require = createRequire(import.meta.url)
const pkg = require('vitepress/package.json')

export default defineConfig({
lang: 'en-US',
Expand Down Expand Up @@ -57,7 +60,7 @@ function nav() {
{ text: 'Guide', link: '/guide/what-is-vitepress', activeMatch: '/guide/' },
{ text: 'Configs', link: '/config/introduction', activeMatch: '/config/' },
{
text: version,
text: pkg.version,
items: [
{
text: 'Changelog',
Expand Down
1 change: 1 addition & 0 deletions docs/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"private": true,
"type": "module",
"devDependencies": {
"vitepress": "workspace:*"
}
Expand Down

0 comments on commit 3f692dc

Please sign in to comment.