11import  fs  from  'fs' 
22import  path  from  'path' 
3- import  {  defineConfigWithTheme  }  from  'vitepress' 
3+ import  {  defineConfigWithTheme ,   type   HeadConfig ,   type   Plugin  }  from  'vitepress' 
44import  type  {  Config  as  ThemeConfig  }  from  '@vue/theme' 
5+ import  llmstxt  from  'vitepress-plugin-llms' 
56import  baseConfig  from  '@vue/theme/config' 
67import  {  headerPlugin  }  from  './headerMdPlugin' 
78// import { textAdPlugin } from './textAdMdPlugin' 
@@ -570,6 +571,17 @@ export const sidebar: ThemeConfig['sidebar'] = {
570571// const i18n: ThemeConfig['i18n'] = { 
571572// } 
572573
574+ function  inlineScript ( file : string ) : HeadConfig  { 
575+   return  [ 
576+     'script' , 
577+     { } , 
578+     fs . readFileSync ( 
579+       path . resolve ( __dirname ,  `./inlined-scripts/${ file }  ) , 
580+       'utf-8' 
581+     ) 
582+   ] 
583+ } 
584+ 
573585export  default  defineConfigWithTheme < ThemeConfig > ( { 
574586  extends : baseConfig , 
575587
@@ -608,25 +620,11 @@ export default defineConfigWithTheme<ThemeConfig>({
608620      'link' , 
609621      { 
610622        rel : 'preconnect' , 
611-         href : 'https://sponsors .vuejs.org' 
623+         href : 'https://automation .vuejs.org' 
612624      } 
613625    ] , 
614-     [ 
615-       'script' , 
616-       { } , 
617-       fs . readFileSync ( 
618-         path . resolve ( __dirname ,  './inlined-scripts/restorePreference.js' ) , 
619-         'utf-8' 
620-       ) 
621-     ] , 
622-     [ 
623-       'script' , 
624-       { } , 
625-       fs . readFileSync ( 
626-         path . resolve ( __dirname ,  './inlined-scripts/uwu.js' ) , 
627-         'utf-8' 
628-       ) 
629-     ] , 
626+     inlineScript ( 'restorePreference.js' ) , 
627+     inlineScript ( 'uwu.js' ) , 
630628    [ 
631629      'script' , 
632630      { 
@@ -642,7 +640,8 @@ export default defineConfigWithTheme<ThemeConfig>({
642640        src : 'https://vueschool.io/banner.js?affiliate=vuejs&type=top' , 
643641        async : 'true' 
644642      } 
645-     ] 
643+     ] , 
644+     inlineScript ( 'perfops.js' ) 
646645  ] , 
647646
648647  themeConfig : { 
@@ -700,7 +699,7 @@ export default defineConfigWithTheme<ThemeConfig>({
700699      { 
701700        link : 'https://ru.vuejs.org' , 
702701        text : 'Русский' , 
703-         repo : 'https://github.com/translation-gang /docs-ru' 
702+         repo : 'https://github.com/vuejs-translations /docs-ru' 
704703      } , 
705704      { 
706705        link : 'https://cs.vuejs.org' , 
@@ -712,6 +711,11 @@ export default defineConfigWithTheme<ThemeConfig>({
712711        text : '繁體中文' , 
713712        repo : 'https://github.com/vuejs-translations/docs-zh-hk' 
714713      } , 
714+       { 
715+         link : 'https://pl.vuejs.org' , 
716+         text : 'Polski' , 
717+         repo : 'https://github.com/vuejs-translations/docs-pl' , 
718+       } , 
715719      { 
716720        link : '/translations/' , 
717721        text : 'Help Us Translate!' , 
@@ -785,6 +789,30 @@ export default defineConfigWithTheme<ThemeConfig>({
785789    } , 
786790    json : { 
787791      stringify : true 
788-     } 
792+     } , 
793+     plugins : [ 
794+       llmstxt ( { 
795+         ignoreFiles : [ 
796+           'about/team/**/*' , 
797+           'about/team.md' , 
798+           'about/privacy.md' , 
799+           'about/coc.md' , 
800+           'developers/**/*' , 
801+           'ecosystem/themes.md' , 
802+           'examples/**/*' , 
803+           'partners/**/*' , 
804+           'sponsor/**/*' , 
805+           'index.md' 
806+         ] , 
807+         customLLMsTxtTemplate : `\ 
808+ # Vue.js 
809+ 
810+ Vue.js - The Progressive JavaScript Framework 
811+ 
812+ ## Table of Contents 
813+ 
814+ {toc}` 
815+       } )  as  Plugin 
816+     ] 
789817  } 
790818} ) 
0 commit comments