File tree Expand file tree Collapse file tree 7 files changed +56
-35
lines changed Expand file tree Collapse file tree 7 files changed +56
-35
lines changed Original file line number Diff line number Diff line change 1
- import { type DefaultTheme , type UserConfig } from 'vitepress '
2
- import vitepress from 'vitepress/package.json '
1
+ import { createRequire } from 'module '
2
+ import { defineConfig , type DefaultTheme } from 'vitepress'
3
3
4
- export default {
4
+ const require = createRequire ( import . meta. url )
5
+ const pkg = require ( 'vitepress/package.json' )
6
+
7
+ export default defineConfig ( {
5
8
lang : 'en-US' ,
6
9
description : 'Vite & Vue powered static site generator.' ,
7
10
@@ -22,7 +25,7 @@ export default {
22
25
copyright : 'Copyright © 2019-present Evan You'
23
26
}
24
27
}
25
- } as UserConfig < DefaultTheme . Config >
28
+ } )
26
29
27
30
function nav ( ) : DefaultTheme . NavItem [ ] {
28
31
return [
@@ -37,7 +40,7 @@ function nav(): DefaultTheme.NavItem[] {
37
40
activeMatch : '/reference/'
38
41
} ,
39
42
{
40
- text : vitepress . version ,
43
+ text : pkg . version ,
41
44
items : [
42
45
{
43
46
text : 'Changelog' ,
Original file line number Diff line number Diff line change 1
- import { type DefaultTheme , type UserConfig } from 'vitepress '
2
- import vitepress from 'vitepress/package.json '
1
+ import { createRequire } from 'module '
2
+ import { defineConfig , type DefaultTheme } from 'vitepress'
3
3
4
- export default {
4
+ const require = createRequire ( import . meta. url )
5
+ const pkg = require ( 'vitepress/package.json' )
6
+
7
+ export default defineConfig ( {
5
8
lang : 'es-CO' ,
6
9
description : 'Generador de Sitios Estaticos desarrollado con Vite y Vue.' ,
7
10
@@ -48,7 +51,7 @@ export default {
48
51
darkModeSwitchTitle : 'Cambiar a modo oscuro' ,
49
52
skipToContentLabel : 'Saltar al contenido'
50
53
}
51
- } as UserConfig < DefaultTheme . Config >
54
+ } )
52
55
53
56
function nav ( ) : DefaultTheme . NavItem [ ] {
54
57
return [
@@ -63,7 +66,7 @@ function nav(): DefaultTheme.NavItem[] {
63
66
activeMatch : '/es/reference/'
64
67
} ,
65
68
{
66
- text : vitepress . version ,
69
+ text : pkg . version ,
67
70
items : [
68
71
{
69
72
text : 'Registro de cambios' ,
Original file line number Diff line number Diff line change 1
- import { type DefaultTheme , type UserConfig } from 'vitepress '
2
- import vitepress from 'vitepress/package.json '
1
+ import { createRequire } from 'module '
2
+ import { defineConfig , type DefaultTheme } from 'vitepress'
3
3
4
- export default {
4
+ const require = createRequire ( import . meta. url )
5
+ const pkg = require ( 'vitepress/package.json' )
6
+
7
+ export default defineConfig ( {
5
8
title : 'ویتپرس' ,
6
9
lang : 'fa-IR' ,
7
10
description : 'Vite & Vue powered static site generator.' ,
@@ -66,7 +69,7 @@ export default {
66
69
} ,
67
70
siteTitle : 'ویتپرس'
68
71
}
69
- } as UserConfig < DefaultTheme . Config >
72
+ } )
70
73
71
74
function nav ( ) : DefaultTheme . NavItem [ ] {
72
75
return [
@@ -81,7 +84,7 @@ function nav(): DefaultTheme.NavItem[] {
81
84
activeMatch : '/reference/'
82
85
} ,
83
86
{
84
- text : vitepress . version ,
87
+ text : pkg . version ,
85
88
items : [
86
89
{
87
90
text : 'Changelog' ,
Original file line number Diff line number Diff line change 1
- import { type DefaultTheme , type UserConfig } from 'vitepress '
2
- import vitepress from 'vitepress/package.json '
1
+ import { createRequire } from 'module '
2
+ import { defineConfig , type DefaultTheme } from 'vitepress'
3
3
4
- export default {
4
+ const require = createRequire ( import . meta. url )
5
+ const pkg = require ( 'vitepress/package.json' )
6
+
7
+ export default defineConfig ( {
5
8
lang : 'ko-KR' ,
6
9
description : 'Vite 및 Vue 기반 정적 사이트 생성기.' ,
7
10
@@ -44,7 +47,7 @@ export default {
44
47
darkModeSwitchTitle : '다크 모드로 변경' ,
45
48
skipToContentLabel : '본문으로 건너뛰기'
46
49
}
47
- } as UserConfig < DefaultTheme . Config >
50
+ } )
48
51
49
52
function nav ( ) : DefaultTheme . NavItem [ ] {
50
53
return [
@@ -59,7 +62,7 @@ function nav(): DefaultTheme.NavItem[] {
59
62
activeMatch : '/ko/reference/'
60
63
} ,
61
64
{
62
- text : vitepress . version ,
65
+ text : pkg . version ,
63
66
items : [
64
67
{
65
68
text : '변경 로그' ,
Original file line number Diff line number Diff line change 1
- import { type DefaultTheme , type UserConfig } from 'vitepress '
2
- import vitepress from 'vitepress/package.json '
1
+ import { createRequire } from 'module '
2
+ import { defineConfig , type DefaultTheme } from 'vitepress'
3
3
4
- export default {
4
+ const require = createRequire ( import . meta. url )
5
+ const pkg = require ( 'vitepress/package.json' )
6
+
7
+ export default defineConfig ( {
5
8
lang : 'pt-BR' ,
6
9
description : 'Gerador de Site Estático desenvolvido com Vite e Vue.' ,
7
10
@@ -48,7 +51,7 @@ export default {
48
51
darkModeSwitchTitle : 'Mudar para Modo Escuro' ,
49
52
skipToContentLabel : 'Pular para o Conteúdo'
50
53
}
51
- } as UserConfig < DefaultTheme . Config >
54
+ } )
52
55
53
56
function nav ( ) : DefaultTheme . NavItem [ ] {
54
57
return [
@@ -63,7 +66,7 @@ function nav(): DefaultTheme.NavItem[] {
63
66
activeMatch : '/pt/reference/'
64
67
} ,
65
68
{
66
- text : vitepress . version ,
69
+ text : pkg . version ,
67
70
items : [
68
71
{
69
72
text : 'Registro de Mudanças' ,
Original file line number Diff line number Diff line change 1
- import { type DefaultTheme , type UserConfig } from 'vitepress '
2
- import vitepress from 'vitepress/package.json '
1
+ import { createRequire } from 'module '
2
+ import { defineConfig , type DefaultTheme } from 'vitepress'
3
3
4
- export default {
4
+ const require = createRequire ( import . meta. url )
5
+ const pkg = require ( 'vitepress/package.json' )
6
+
7
+ export default defineConfig ( {
5
8
lang : 'ru-RU' ,
6
9
description : 'Генератор статических сайтов на основе Vite и Vue.' ,
7
10
@@ -42,7 +45,7 @@ export default {
42
45
langMenuLabel : 'Изменить язык' ,
43
46
skipToContentLabel : 'Перейти к содержимому'
44
47
}
45
- }
48
+ } )
46
49
47
50
function nav ( ) : DefaultTheme . NavItem [ ] {
48
51
return [
@@ -57,7 +60,7 @@ function nav(): DefaultTheme.NavItem[] {
57
60
activeMatch : '/ru/reference/'
58
61
} ,
59
62
{
60
- text : vitepress . version ,
63
+ text : pkg . version ,
61
64
items : [
62
65
{
63
66
text : 'Изменения' ,
Original file line number Diff line number Diff line change 1
- import { type DefaultTheme , type UserConfig } from 'vitepress '
2
- import vitepress from 'vitepress/package.json '
1
+ import { createRequire } from 'module '
2
+ import { defineConfig , type DefaultTheme } from 'vitepress'
3
3
4
- export default {
4
+ const require = createRequire ( import . meta. url )
5
+ const pkg = require ( 'vitepress/package.json' )
6
+
7
+ export default defineConfig ( {
5
8
lang : 'zh-Hans' ,
6
9
description : '由 Vite 和 Vue 驱动的静态站点生成器' ,
7
10
@@ -55,7 +58,7 @@ export default {
55
58
darkModeSwitchTitle : '切换到深色模式' ,
56
59
skipToContentLabel : '跳转到内容'
57
60
}
58
- } as UserConfig < DefaultTheme . Config >
61
+ } )
59
62
60
63
function nav ( ) : DefaultTheme . NavItem [ ] {
61
64
return [
@@ -70,7 +73,7 @@ function nav(): DefaultTheme.NavItem[] {
70
73
activeMatch : '/zh/reference/'
71
74
} ,
72
75
{
73
- text : vitepress . version ,
76
+ text : pkg . version ,
74
77
items : [
75
78
{
76
79
text : '更新日志' ,
You can’t perform that action at this time.
0 commit comments