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' ;
44import {
55 groupIconMdPlugin ,
66 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' ;
99
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' ;
1414
1515// 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' ;
1818
1919const deployType = ( ( ) => {
2020 switch ( deployURL ) {
2121 // case 'https://main--vite-docs-main.netlify.app':
2222 // return 'main'
2323 case '' :
24- return 'local'
24+ return 'local' ;
2525 default :
26- return 'release'
26+ return 'release' ;
2727 }
28- } ) ( )
28+ } ) ( ) ;
2929const additionalTitle = ( ( ) : string => {
3030 switch ( deployType ) {
3131 // case 'main':
3232 // return ' (main branch)'
3333 case 'local' :
34- return ' (local)'
34+ return ' (local)' ;
3535 case 'release' :
36- return ''
36+ return '' ;
3737 }
38- } ) ( )
38+ } ) ( ) ;
3939const versionLinks = ( ( ) : DefaultTheme . NavItemWithLink [ ] => {
4040 const oldVersions : DefaultTheme . NavItemWithLink [ ] = [
4141 {
@@ -54,7 +54,7 @@ const versionLinks = ((): DefaultTheme.NavItemWithLink[] => {
5454 text : 'Vite 2 ドキュメント' ,
5555 link : 'https://v2.vite.dev' ,
5656 } ,
57- ]
57+ ] ;
5858
5959 switch ( deployType ) {
6060 // case 'main':
@@ -65,11 +65,11 @@ const versionLinks = ((): DefaultTheme.NavItemWithLink[] => {
6565 link : 'https://vite.dev' ,
6666 } ,
6767 ...oldVersions ,
68- ]
68+ ] ;
6969 case 'release' :
70- return oldVersions
70+ return oldVersions ;
7171 }
72- } ) ( )
72+ } ) ( ) ;
7373
7474export default defineConfig ( {
7575 title : `Vite${ additionalTitle } ` ,
@@ -306,6 +306,10 @@ export default defineConfig({
306306 text : 'パフォーマンス' ,
307307 link : '/guide/performance' ,
308308 } ,
309+ {
310+ text : 'Rolldown' ,
311+ link : '/guide/rolldown' ,
312+ } ,
309313 {
310314 text : 'v5 からの移行' ,
311315 link : '/guide/migration' ,
@@ -450,18 +454,18 @@ export default defineConfig({
450454 transformPageData ( pageData ) {
451455 const canonicalUrl = `${ ogUrl } /${ pageData . relativePath } `
452456 . replace ( / \/ i n d e x \. m d $ / , '/' )
453- . replace ( / \. m d $ / , '' )
454- pageData . frontmatter . head ??= [ ]
457+ . replace ( / \. m d $ / , '' ) ;
458+ pageData . frontmatter . head ??= [ ] ;
455459 pageData . frontmatter . head . unshift (
456460 [ 'link' , { rel : 'canonical' , href : canonicalUrl } ] ,
457461 [ 'meta' , { property : 'og:title' , content : pageData . title } ] ,
458- )
459- return pageData
462+ ) ;
463+ return pageData ;
460464 } ,
461465 markdown : {
462466 codeTransformers : [ transformerTwoslash ( ) ] ,
463467 config ( md ) {
464- md . use ( groupIconMdPlugin )
468+ md . use ( groupIconMdPlugin ) ;
465469 } ,
466470 } ,
467471 vite : {
@@ -483,4 +487,4 @@ export default defineConfig({
483487 } ,
484488 } ,
485489 buildEnd,
486- } )
490+ } ) ;
0 commit comments