Skip to content

Commit

Permalink
chore: update deps and adjust configs
Browse files Browse the repository at this point in the history
  • Loading branch information
rockbenben committed Jan 13, 2024
1 parent dfa0019 commit f41c12b
Show file tree
Hide file tree
Showing 6 changed files with 367 additions and 2,876 deletions.
30 changes: 4 additions & 26 deletions docs/.vuepress/config.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import { docsearchPlugin } from "@vuepress/plugin-docsearch";
import { googleAnalyticsPlugin } from "@vuepress/plugin-google-analytics";
import { path } from "@vuepress/utils";
import { defineUserConfig } from "vuepress";
import { searchProPlugin } from "vuepress-plugin-search-pro";
import { googleAnalyticsPlugin } from "@vuepress/plugin-google-analytics";

import theme from "./theme.js";

Expand All @@ -12,8 +10,7 @@ export default defineUserConfig({
// 网站标题
title: "LearnData-开源笔记",
// 网站描述
description:
"开源工具、效率方法、心理学探索的自我提升笔记,记录并输出一切能让自己提升的知识。",
description: "开源工具、效率方法、心理学探索的自我提升笔记,记录并输出一切能让自己提升的知识。",

// 网站路径默认为主域名。如果网站部署在子路径下,比如 xxx.com/yyy,那么 base 应该被设置为 "/yyy/"
base: "/",
Expand All @@ -27,32 +24,13 @@ export default defineUserConfig({
templateBuild: path.resolve(__dirname, "templateBuild.html"),

// 禁止文件夹生成静态文件,参考 [VuePress 文档](https://v2.vuepress.vuejs.org/zh/guide/page.html#routing)
pagePatterns: [
"**/*.md",
"!_temp",
"!reading",
"!.vuepress",
"!node_modules",
],
pagePatterns: ["**/*.md", "!_temp", "!reading", "!.vuepress", "!node_modules"],

plugins: [
// 谷歌分析
googleAnalyticsPlugin({
// 需要设置自己的 ID
// 设置你的 Analytics ID
id: "G-RWKZTY2P9R",
}),

// Algolia 全文搜索:需要自己设置爬虫并生成下方配置,如不会自己设置,启用下方本地搜索
docsearchPlugin({
indexName: "newzone",
appId: "M4EXXEZIEG",
apiKey: "fd8891a9c4cc21e0ef4f11bf44f7a11e",
}),

// // 本地搜索,和上方二选一
// searchProPlugin({
// // 索引全部内容
// indexContent: true,
// }),
],
});
7 changes: 1 addition & 6 deletions docs/.vuepress/sidebar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,12 +100,7 @@ export default sidebar({
text: "Basic",
icon: "emmet",
collapsible: true,
children: [
"Markdown.md",
"Electron.md",
"AutoHotkey.md",
"Regex.md",
],
children: ["Markdown.md", "Electron.md", "AutoHotkey.md", "Regex.md"],
},
{
text: "FrondEnd",
Expand Down
18 changes: 14 additions & 4 deletions docs/.vuepress/theme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,7 @@ export default hopeTheme({
medias: {
GitHub: "https://github.com/rockbenben",
Zhihu: "https://www.zhihu.com/people/qingwhat",
少数派: [
"https://sspai.com/u/zqj05i4v/posts",
path.resolve(__dirname, "icons/sspai.svg"),
],
少数派: ["https://sspai.com/u/zqj05i4v/posts", path.resolve(__dirname, "./icons/sspai.svg")],
Wechat: "https://img.newzone.top/wechat.svg",
Email: "mailto:[email protected]",
Discord: "https://discord.gg/PZTQfJ4GjX",
Expand Down Expand Up @@ -169,6 +166,19 @@ export default hopeTheme({
rss: true,
count: 10,
},

// Algolia 全文搜索:需要自己设置爬虫并生成下方配置,如不会自己设置,启用下方本地搜索
docsearch: {
indexName: "newzone",
appId: "M4EXXEZIEG",
apiKey: "fd8891a9c4cc21e0ef4f11bf44f7a11e",
},

// 本地搜索,和上方二选一
/* searchPro: {
// 索引全部内容
indexContent: true,
}, */
},

// 开发模式下是否启动热更新,显示所有更改并重新渲染
Expand Down
80 changes: 15 additions & 65 deletions docs/reading/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,28 +3,16 @@
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta
name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"
/>
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0" />
<title>LearnData - 读书笔记</title>
<meta name="description" content="读书笔记" />
<meta name="keywords" content="读书笔记,阅读笔记" />
<link
rel="stylesheet"
href="https://lf9-cdn-tos.bytecdntp.com/cdn/expire-1-y/docsify/4.12.2/themes/vue.css"
/>
<link
rel="stylesheet"
href="https://oss.newzone.top/docsify/docsify-toc/dist/toc.css"
/>
<link rel="stylesheet" href="https://oss.newzone.top/docsify/main/4.13.1/themes/vue.css" />
<link rel="stylesheet" href="https://oss.newzone.top/docsify/docsify-toc/dist/toc.css" />
<!-- <link rel="stylesheet" href="https://oss.newzone.top/docsify/docsify-gifcontrol/dist/docsify-gifcontrol.css"> -->
<!-- docsify waline -->
<script src="https://unpkg.com/@waline/client@v2/dist/waline.js"></script>
<link
rel="stylesheet"
href="https://unpkg.com/@waline/client@v2/dist/waline.css"
/>
<link rel="stylesheet" href="https://unpkg.com/@waline/client@v2/dist/waline.css" />
<style>
.anchor {
font-weight: bold;
Expand Down Expand Up @@ -190,9 +178,9 @@
};
</script>

<script src="https://lf6-cdn-tos.bytecdntp.com/cdn/expire-1-y/docsify/4.12.2/docsify.min.js"></script>
<script src="https://lf6-cdn-tos.bytecdntp.com/cdn/expire-1-y/docsify/4.12.2/plugins/search.min.js"></script>
<script src="https://lf9-cdn-tos.bytecdntp.com/cdn/expire-1-y/docsify/4.12.2/plugins/zoom-image.min.js"></script>
<script src="https://oss.newzone.top/docsify/main/4.13.1/docsify.min.js"></script>
<script src="https://oss.newzone.top/docsify/main/4.13.1/plugins/search.min.js"></script>
<script src="https://oss.newzone.top/docsify/main/4.13.1/plugins/zoom-image.min.js"></script>
<script src="https://oss.newzone.top/docsify/docsify-pagination/dist/docsify-pagination.min.js"></script>
<script src="https://oss.newzone.top/docsify/docsify-toc/dist/toc.js"></script>
<script src="https://oss.newzone.top/docsify/docsify-footer-enh/dist/docsify-footer-enh.min.js"></script>
Expand All @@ -210,7 +198,7 @@
-->

<script src="https://lf26-cdn-tos.bytecdntp.com/cdn/expire-1-y/jquery/3.6.0/jquery.min.js"></script>
<script src="https://lf3-cdn-tos.bytecdntp.com/cdn/expire-1-y/instant.page/5.1.0/instantpage.min.js"></script>
<script src="https://oss.newzone.top/instantpage.min.js"></script>
<!-- 添加网站运行时间统计 -->
<script language="javascript">
function siteTime() {
Expand All @@ -235,56 +223,18 @@
minutes - 0-59 之间的整数,做为 date 对象的分钟数
seconds - 0-59 之间的整数,做为 date 对象的秒数
microseconds - 0-999 之间的整数,做为 date 对象的毫秒数 */
var t1 = Date.UTC(2022, 07, 23, 22, 22, 22); //北京时间 2022-07-23 22:22:22 //LearnData 首个 commit 时间,该为你自己值得纪念的日子吧
var t2 = Date.UTC(
todayYear,
todayMonth,
todayDate,
todayHour,
todayMinute,
todaySecond,
);
var t1 = Date.UTC(2022, 7, 23, 22, 22, 22); //北京时间 2022-07-23 22:22:22 //LearnData 首个 commit 时间,该为你自己值得纪念的日子吧
var t2 = Date.UTC(todayYear, todayMonth, todayDate, todayHour, todayMinute, todaySecond);
var diff = t2 - t1;
var diffYears = Math.floor(diff / years);
var diffDays = Math.floor(diff / days - diffYears * 365);
var diffHours = Math.floor(
(diff - (diffYears * 365 + diffDays) * days) / hours,
);
var diffMinutes = Math.floor(
(diff - (diffYears * 365 + diffDays) * days - diffHours * hours) /
minutes,
);
var diffSeconds = Math.floor(
(diff -
(diffYears * 365 + diffDays) * days -
diffHours * hours -
diffMinutes * minutes) /
seconds,
);
var diffHours = Math.floor((diff - (diffYears * 365 + diffDays) * days) / hours);
var diffMinutes = Math.floor((diff - (diffYears * 365 + diffDays) * days - diffHours * hours) / minutes);
var diffSeconds = Math.floor((diff - (diffYears * 365 + diffDays) * days - diffHours * hours - diffMinutes * minutes) / seconds);
if (diffYears > 0) {
document.getElementById("sitetime").innerHTML =
" 已运行 " +
diffYears +
" 年 " +
diffDays +
" 天 " +
diffHours +
" 小时 " +
diffMinutes +
" 分 " +
diffSeconds +
" 秒 ";
document.getElementById("sitetime").innerHTML = " 已运行 " + diffYears + " 年 " + diffDays + " 天 " + diffHours + " 小时 " + diffMinutes + " 分 " + diffSeconds + " 秒 ";
} else {
document.getElementById("sitetime").innerHTML =
" 已运行 " +
diffDays +
" 天 " +
diffHours +
" 小时 " +
diffMinutes +
" 分 " +
diffSeconds +
" 秒 ";
document.getElementById("sitetime").innerHTML = " 已运行 " + diffDays + " 天 " + diffHours + " 小时 " + diffMinutes + " 分 " + diffSeconds + " 秒 ";
}
}
siteTime();
Expand Down
13 changes: 7 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "learn-data",
"version": "1.2.7",
"version": "1.2.8",
"license": "MIT",
"type": "module",
"scripts": {
Expand All @@ -20,18 +20,19 @@
"@vuepress/utils": "2.0.0-rc.0",
"cpx2": "^4.2.3",
"markdownlint-cli": "^0.38.0",
"prettier": "^3.1.1",
"vue": "^3.3.12",
"prettier": "^3.2.1",
"vue": "^3.4.12",
"vuepress": "2.0.0-rc.0",
"vuepress-plugin-search-pro": "2.0.0-rc.5",
"vuepress-theme-hope": "2.0.0-rc.5"
"vuepress-plugin-feed2": "^2.0.0-rc.11",
"vuepress-plugin-search-pro": "2.0.0-rc.11",
"vuepress-theme-hope": "2.0.0-rc.11"
},
"devDependencies": {
"@waline/client": "^2.15.8",
"mathjax-full": "^3.2.2",
"vidstack": "^1.9.8"
},
"packageManager": "pnpm@8.12.1",
"packageManager": "pnpm@8.14.1",
"engines": {
"node": ">=18.16.0"
}
Expand Down
Loading

0 comments on commit f41c12b

Please sign in to comment.