fix(theme): build html fail

This commit is contained in:
pengzhanbo 2024-01-03 16:32:30 +08:00
parent 33e2fb78c8
commit 8625c68202
2 changed files with 4 additions and 5 deletions

View File

@ -3,7 +3,6 @@ import config from '@pengzhanbo/eslint-config-vue'
export default config({ export default config({
formatters: { formatters: {
css: true, css: true,
html: true,
}, },
ignores: ['lib', 'docs/**/*.md'], ignores: ['lib', 'docs/**/*.md'],
globals: { globals: {

View File

@ -7,14 +7,14 @@
<meta name="theme" content="VuePress Theme Plume {{ themeVersion }}" /> <meta name="theme" content="VuePress Theme Plume {{ themeVersion }}" />
<script> <script>
;(function () { ;(function () {
const um = localStorage.getItem('vuepress-theme-appearance') const um = localStorage.getItem('vuepress-theme-appearance');
const sm = const sm =
window.matchMedia && window.matchMedia &&
window.matchMedia('(prefers-color-scheme: dark)').matches window.matchMedia('(prefers-color-scheme: dark)').matches;
if (um === 'dark' || (um !== 'light' && sm)) { if (um === 'dark' || (um !== 'light' && sm)) {
document.documentElement.classList.add('dark') document.documentElement.classList.add('dark');
} }
})() })();
</script> </script>
<!--vuepress-ssr-head--> <!--vuepress-ssr-head-->
<!--vuepress-ssr-styles--> <!--vuepress-ssr-styles-->