1
- import type { DefaultTheme } from 'vitepress'
2
- import { defineConfig } from 'vitepress'
3
- import { transformerTwoslash } from '@shikijs/vitepress-twoslash'
1
+ import type { DefaultTheme } from 'vitepress' ;
2
+ import { defineConfig } from 'vitepress' ;
3
+ import { transformerTwoslash } from '@shikijs/vitepress-twoslash' ;
4
4
import {
5
5
groupIconMdPlugin ,
6
6
groupIconVitePlugin ,
7
- } from 'vitepress-plugin-group-icons'
8
- import { buildEnd } from './buildEnd.config'
7
+ } from 'vitepress-plugin-group-icons' ;
8
+ import { buildEnd } from './buildEnd.config' ;
9
9
10
- const ogDescription = '次世代フロントエンドツール'
11
- const ogImage = 'https://vite.dev/og-image.jpg'
12
- const ogTitle = 'Vite'
13
- const ogUrl = 'https://vite.dev'
10
+ const ogDescription = '次世代フロントエンドツール' ;
11
+ const ogImage = 'https://vite.dev/og-image.jpg' ;
12
+ const ogTitle = 'Vite' ;
13
+ const ogUrl = 'https://vite.dev' ;
14
14
15
15
// netlify envs
16
- const deployURL = process . env . DEPLOY_PRIME_URL || ''
17
- const commitRef = process . env . COMMIT_REF ?. slice ( 0 , 8 ) || 'dev'
16
+ const deployURL = process . env . DEPLOY_PRIME_URL || '' ;
17
+ const commitRef = process . env . COMMIT_REF ?. slice ( 0 , 8 ) || 'dev' ;
18
18
19
19
const deployType = ( ( ) => {
20
20
switch ( deployURL ) {
21
21
// case 'https://main--vite-docs-main.netlify.app':
22
22
// return 'main'
23
23
case '' :
24
- return 'local'
24
+ return 'local' ;
25
25
default :
26
- return 'release'
26
+ return 'release' ;
27
27
}
28
- } ) ( )
28
+ } ) ( ) ;
29
29
const additionalTitle = ( ( ) : string => {
30
30
switch ( deployType ) {
31
31
// case 'main':
32
32
// return ' (main branch)'
33
33
case 'local' :
34
- return ' (local)'
34
+ return ' (local)' ;
35
35
case 'release' :
36
- return ''
36
+ return '' ;
37
37
}
38
- } ) ( )
38
+ } ) ( ) ;
39
39
const versionLinks = ( ( ) : DefaultTheme . NavItemWithLink [ ] => {
40
40
const oldVersions : DefaultTheme . NavItemWithLink [ ] = [
41
41
{
@@ -54,7 +54,7 @@ const versionLinks = ((): DefaultTheme.NavItemWithLink[] => {
54
54
text : 'Vite 2 ドキュメント' ,
55
55
link : 'https://v2.vite.dev' ,
56
56
} ,
57
- ]
57
+ ] ;
58
58
59
59
switch ( deployType ) {
60
60
// case 'main':
@@ -65,11 +65,11 @@ const versionLinks = ((): DefaultTheme.NavItemWithLink[] => {
65
65
link : 'https://vite.dev' ,
66
66
} ,
67
67
...oldVersions ,
68
- ]
68
+ ] ;
69
69
case 'release' :
70
- return oldVersions
70
+ return oldVersions ;
71
71
}
72
- } ) ( )
72
+ } ) ( ) ;
73
73
74
74
export default defineConfig ( {
75
75
title : `Vite${ additionalTitle } ` ,
@@ -306,6 +306,10 @@ export default defineConfig({
306
306
text : 'パフォーマンス' ,
307
307
link : '/guide/performance' ,
308
308
} ,
309
+ {
310
+ text : 'Rolldown' ,
311
+ link : '/guide/rolldown' ,
312
+ } ,
309
313
{
310
314
text : 'v5 からの移行' ,
311
315
link : '/guide/migration' ,
@@ -450,18 +454,18 @@ export default defineConfig({
450
454
transformPageData ( pageData ) {
451
455
const canonicalUrl = `${ ogUrl } /${ pageData . relativePath } `
452
456
. replace ( / \/ i n d e x \. m d $ / , '/' )
453
- . replace ( / \. m d $ / , '' )
454
- pageData . frontmatter . head ??= [ ]
457
+ . replace ( / \. m d $ / , '' ) ;
458
+ pageData . frontmatter . head ??= [ ] ;
455
459
pageData . frontmatter . head . unshift (
456
460
[ 'link' , { rel : 'canonical' , href : canonicalUrl } ] ,
457
461
[ 'meta' , { property : 'og:title' , content : pageData . title } ] ,
458
- )
459
- return pageData
462
+ ) ;
463
+ return pageData ;
460
464
} ,
461
465
markdown : {
462
466
codeTransformers : [ transformerTwoslash ( ) ] ,
463
467
config ( md ) {
464
- md . use ( groupIconMdPlugin )
468
+ md . use ( groupIconMdPlugin ) ;
465
469
} ,
466
470
} ,
467
471
vite : {
@@ -483,4 +487,4 @@ export default defineConfig({
483
487
} ,
484
488
} ,
485
489
buildEnd,
486
- } )
490
+ } ) ;
0 commit comments