From fb281c6bec0ea40442205a7430d424254c92e9ea Mon Sep 17 00:00:00 2001
From: camera-2018 <2907618001@qq.com>
Date: Fri, 1 Sep 2023 01:32:38 +0800
Subject: [PATCH] chore: view transition dark
---
.vitepress/config.js | 8 +----
.vitepress/theme/Layout.vue | 70 +++++++++++++++++++++++++++++++++++++
.vitepress/theme/index.js | 6 ++--
3 files changed, 73 insertions(+), 11 deletions(-)
create mode 100644 .vitepress/theme/Layout.vue
diff --git a/.vitepress/config.js b/.vitepress/config.js
index 6f7fb0a..811b2d2 100644
--- a/.vitepress/config.js
+++ b/.vitepress/config.js
@@ -6,7 +6,6 @@ import { nav } from './nav.js';
import PanguPlugin from 'markdown-it-pangu'
import { fileURLToPath, URL } from 'node:url'
import VueMacros from 'unplugin-vue-macros/vite'
-import Vue from '@vitejs/plugin-vue'
const customElements = [
'mjx-container',
@@ -144,6 +143,7 @@ export default withMermaid({
externalLinkIcon: true,
},
markdown: {
+ lineNumbers: true,
config: (md) => {
md.use(mathjax3);
md.use(PanguPlugin);
@@ -166,12 +166,6 @@ export default withMermaid({
],
resolve: {
alias: [
- {
- find: /^.*\/VPSwitchAppearance\.vue$/,
- replacement: fileURLToPath(
- new URL('./components/CustomSwitchAppearance.vue', import.meta.url)
- )
- },
{
find: /^.*\/NotFound\.vue$/,
replacement: fileURLToPath(
diff --git a/.vitepress/theme/Layout.vue b/.vitepress/theme/Layout.vue
new file mode 100644
index 0000000..a4567b2
--- /dev/null
+++ b/.vitepress/theme/Layout.vue
@@ -0,0 +1,70 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.vitepress/theme/index.js b/.vitepress/theme/index.js
index 72062c9..d09f77a 100644
--- a/.vitepress/theme/index.js
+++ b/.vitepress/theme/index.js
@@ -2,6 +2,7 @@
import { h, watch } from 'vue'
// import Theme from 'vitepress/theme'
import DefaultTheme from 'vitepress/theme-without-fonts'
+import Layout from './Layout.vue'
import Download from '../../components/Download.vue'
import Bilibili from '../../components/Bilibili.vue'
import Parallax from '../../components/Parallax.vue'
@@ -12,10 +13,7 @@ let homePageStyle = undefined
export default {
...DefaultTheme,
- Layout: () => {
- return h(DefaultTheme.Layout, null, {
- })
- },
+ Layout: Layout,
enhanceApp(ctx) {
DefaultTheme.enhanceApp(ctx)
ctx.app.component('Download', Download)