From a086d6eba4527c9bdc78a68c7cc57738c7250f50 Mon Sep 17 00:00:00 2001 From: xugaoyi <894072666@qq.com> Date: Thu, 18 Aug 2022 14:19:14 +0800 Subject: [PATCH] fix: v1.12.8 --- docs/.vuepress/config.ts | 11 ++++++++++- package.json | 7 ++++--- vdoing/components/Catalogue.vue | 18 +++++++++--------- vdoing/package.json | 2 +- 4 files changed, 24 insertions(+), 14 deletions(-) diff --git a/docs/.vuepress/config.ts b/docs/.vuepress/config.ts index f6eb6d8..970c042 100644 --- a/docs/.vuepress/config.ts +++ b/docs/.vuepress/config.ts @@ -8,6 +8,9 @@ import dayjs from 'dayjs' import baiduCode from './config/baiduCode' // 百度统计hm码 import htmlModules from './config/htmlModules' // 自定义插入的html块 +const DOMAIN_NAME = 'xugaoyi.com' // 域名 (不带https) +const WEB_SITE = `https://${DOMAIN_NAME}` // 网址 + export default defineConfig4CustomTheme({ theme: 'vdoing', // 使用npm主题包 // theme: resolve(__dirname, '../../vdoing'), // 使用本地主题包 @@ -240,6 +243,12 @@ export default defineConfig4CustomTheme({ // 插件配置 plugins: [ + [ + "sitemap", // 网站地图 + { + hostname: WEB_SITE, + }, + ], 'vuepress-plugin-baidu-autopush', // 百度自动推送 @@ -277,7 +286,7 @@ export default defineConfig4CustomTheme({ }, { title: '通过百度搜索本站的', - frontUrl: 'https://www.baidu.com/s?wd=site%3Axugaoyi.com%20', + frontUrl: `https://www.baidu.com/s?wd=site%3A${DOMAIN_NAME}%20`, }, ], } diff --git a/package.json b/package.json index c639588..b02a970 100644 --- a/package.json +++ b/package.json @@ -2,8 +2,8 @@ "name": "theme-vdoing-blog", "version": "1.0.0", "scripts": { - "dev": "vuepress dev docs", - "build": "vuepress build docs", + "dev": "node --max_old_space_size=4096 ./node_modules/vuepress/cli.js dev docs", + "build": "node --max_old_space_size=4096 ./node_modules/vuepress/cli.js build docs", "deploy": "bash deploy.sh", "editFm": "node utils/editFrontmatter.js", "baiduPush": "node utils/baiduPush.js https://xugaoyi.com && bash baiduPush.sh", @@ -22,9 +22,10 @@ "vuepress-plugin-demo-block": "^0.7.2", "vuepress-plugin-fulltext-search": "^2.2.1", "vuepress-plugin-one-click-copy": "^1.0.2", + "vuepress-plugin-sitemap": "^2.3.1", "vuepress-plugin-thirdparty-search": "^1.0.2", "vuepress-plugin-zooming": "^1.1.7", - "vuepress-theme-vdoing": "^1.12.7", + "vuepress-theme-vdoing": "^1.12.8", "yamljs": "^0.3.0" } } diff --git a/vdoing/components/Catalogue.vue b/vdoing/components/Catalogue.vue index 968b6d5..39dcb49 100644 --- a/vdoing/components/Catalogue.vue +++ b/vdoing/components/Catalogue.vue @@ -206,15 +206,15 @@ dl, dd dd margin-top 0.7rem margin-left 1rem - a:not(.header-anchor) - margin-bottom 0.5rem - display inline-block - width 50% - &:hover - color $activeColor - text-decoration none - @media (max-width $MQMobileNarrow) - width 100% + a:not(.header-anchor) + margin-bottom 0.5rem + display inline-block + width 50% + &:hover + color $activeColor + text-decoration none + @media (max-width 720px) + width 100% .sub-cat-wrap margin 5px 0 8px 0 font-size 0.95rem diff --git a/vdoing/package.json b/vdoing/package.json index af380ea..b7e0e6b 100644 --- a/vdoing/package.json +++ b/vdoing/package.json @@ -1,6 +1,6 @@ { "name": "vuepress-theme-vdoing", - "version": "1.12.7", + "version": "1.12.8", "description": "Vdoing theme for VuePress. 一个基于VuePress的知识管理兼博客主题。", "author": { "name": "gaoyi(Evan) Xu"