diff --git a/docs/.vuepress/client.ts b/docs/.vuepress/client.ts index 18b0112f4..f64a4ad30 100644 --- a/docs/.vuepress/client.ts +++ b/docs/.vuepress/client.ts @@ -1,4 +1,4 @@ -import SocialLink from "./components/SocialLink"; +import SocialLink from "./components/SocialLink.js"; import { defineClientConfig } from "vuepress/client"; export default defineClientConfig({ diff --git a/docs/.vuepress/config.ts b/docs/.vuepress/config.ts index 704c34a31..5209d5943 100644 --- a/docs/.vuepress/config.ts +++ b/docs/.vuepress/config.ts @@ -5,6 +5,9 @@ import { googleAnalyticsPlugin } from "@vuepress/plugin-google-analytics"; import theme from "./theme.js"; export default defineUserConfig({ + // 网站路径默认为主域名。如果网站部署在子路径下,比如 xxx.com/yyy,那么 base 应该被设置为 "/yyy/" + base: "/", + // 网站语言,默认为中文 lang: "zh-CN", // 网站标题 @@ -12,9 +15,6 @@ export default defineUserConfig({ // 网站描述 description: "开源工具、效率方法、心理学探索的自我提升笔记,记录并输出一切能让自己提升的知识。", - // 网站路径默认为主域名。如果网站部署在子路径下,比如 xxx.com/yyy,那么 base 应该被设置为 "/yyy/" - base: "/", - theme, // 是否开启页面预拉取,如果服务器宽带足够,可改为 true,会提升其他页面加载速度 shouldPrefetch: false, diff --git a/docs/.vuepress/sidebar.ts b/docs/.vuepress/sidebar.ts index cd6a62a9c..95a7920c9 100644 --- a/docs/.vuepress/sidebar.ts +++ b/docs/.vuepress/sidebar.ts @@ -82,7 +82,7 @@ export default sidebar({ }, { text: "博客文章", - icon: "fa-solid fa-blog", + icon: "fa-solid fa-feather-pointed", prefix: "/_posts/", link: "/blog", collapsible: true, diff --git a/docs/.vuepress/styles/config.scss b/docs/.vuepress/styles/config.scss index 5991626d1..8f49db90b 100644 --- a/docs/.vuepress/styles/config.scss +++ b/docs/.vuepress/styles/config.scss @@ -1,4 +1,10 @@ -// 响应式布局断点,和代码块主题设置,而非网站主题 +// 响应式布局断点,网站主题色和代码块主题设置 +// https://theme-hope.vuejs.press/zh/config/style.html +// you can change config here + +//$theme-color: #3eaf7c !default; +//$theme-colors: #2196f3, #f26d6d, #fb9b5f; + // https://theme-hope.vuejs.press/zh/guide/interface/code-theme.html //$code-light-theme: 'one-light'; //$code-dark-theme: 'one-dark'; diff --git a/docs/.vuepress/theme.ts b/docs/.vuepress/theme.ts index c596e9969..fcf8aecce 100644 --- a/docs/.vuepress/theme.ts +++ b/docs/.vuepress/theme.ts @@ -1,6 +1,6 @@ import { hopeTheme } from "vuepress-theme-hope"; -import navbar from "./navbar"; -import sidebar from "./sidebar"; +import navbar from "./navbar.js"; +import sidebar from "./sidebar.js"; export default hopeTheme({ // 主题选项:https://theme-hope.vuejs.press/zh/config/theme/layout.html @@ -184,7 +184,7 @@ export default hopeTheme({ json: true, rss: true, count: 10, - sorter: (a, b) => b.frontmatter.date - a.frontmatter.date, + sorter: (a, b) => Number(b.frontmatter.date) - Number(a.frontmatter.date), }, }, diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 000000000..76183c082 --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,9 @@ +{ + "compilerOptions": { + "module": "NodeNext", + "moduleResolution": "NodeNext", + "target": "ES2022" + }, + "include": ["docs/.vuepress/**/*.ts", "docs/.vuepress/**/*.vue"], + "exclude": ["node_modules"] +}