File tree Expand file tree Collapse file tree 2 files changed +35
-35
lines changed
Expand file tree Collapse file tree 2 files changed +35
-35
lines changed Original file line number Diff line number Diff line change @@ -142,41 +142,41 @@ export const commonConfig :UserConfig<DefaultTheme.Config> = {
142142 }
143143 } ,
144144 ignoreDeadLinks : true ,
145- transformHead ( { assets } ) {
146- const preloadLinks = [ ] ;
145+ // transformHead({ assets }) {
146+ // const preloadLinks = [];
147147
148- const scFontFile = assets . find ( file => / H a r m o n y O S _ S a n s _ S C _ R e g u l a r \. [ \w - ] + \. t t f / . test ( file ) ) ;
149- console . log ( scFontFile ) ;
150- if ( scFontFile ) {
151- preloadLinks . push ( [
152- 'link' ,
153- {
154- rel : 'preload' ,
155- href : scFontFile ,
156- as : 'font' ,
157- type : 'font/ttf' ,
158- crossorigin : ''
159- }
160- ] ) ;
161- }
148+ // const scFontFile = assets.find(file => /HarmonyOS_Sans_SC_Regular\.[\w-]+\.ttf/.test(file));
149+ // console.log(scFontFile);
150+ // if (scFontFile) {
151+ // preloadLinks.push([
152+ // 'link',
153+ // {
154+ // rel: 'preload',
155+ // href: scFontFile,
156+ // as: 'font',
157+ // type: 'font/ttf',
158+ // crossorigin: ''
159+ // }
160+ // ]);
161+ // }
162162
163- const tcFontFile = assets . find ( file => / H a r m o n y O S _ S a n s _ T C _ R e g u l a r \. [ \w - ] + \. t t f / . test ( file ) ) ;
164- if ( tcFontFile ) {
165- preloadLinks . push ( [
166- 'link' ,
167- {
168- rel : 'preload' ,
169- href : tcFontFile ,
170- as : 'font' ,
171- type : 'font/ttf' ,
172- crossorigin : ''
173- }
174- ] ) ;
175- }
163+ // const tcFontFile = assets.find(file => /HarmonyOS_Sans_TC_Regular\.[\w-]+\.ttf/.test(file));
164+ // if (tcFontFile) {
165+ // preloadLinks.push([
166+ // 'link',
167+ // {
168+ // rel: 'preload',
169+ // href: tcFontFile,
170+ // as: 'font',
171+ // type: 'font/ttf',
172+ // crossorigin: ''
173+ // }
174+ // ]);
175+ // }
176176
177- return [
178- ...preloadLinks ,
179- [ "link" , { rel : "icon" , href : "https://docs.mihono.cn/favicon.ico" } ] ,
180- ] ;
181- } ,
177+ // return [
178+ // ...preloadLinks,
179+ // ["link", { rel: "icon", href: "https://docs.mihono.cn/favicon.ico" }],
180+ // ];
181+ // },
182182}
Original file line number Diff line number Diff line change 11//@ts -nocheck
22import { h } from "vue" ;
33import type { Theme } from "vitepress" ;
4- import DefaultTheme from 'vitepress/theme-without-fonts '
4+ import DefaultTheme from 'vitepress/theme'
55import vitepressNprogress from "vitepress-plugin-nprogress" ;
66import { useData , useRoute , inBrowser } from "vitepress" ;
77import "./styles/index.css" ;
You can’t perform that action at this time.
0 commit comments