This commit is contained in:
Bunny 2025-02-19 10:05:40 +08:00
commit 9bd515cfcb
27 changed files with 5049 additions and 0 deletions

50
.github/workflows/deploy-docs.yml vendored Normal file
View File

@ -0,0 +1,50 @@
name: 部署文档
on:
push:
branches:
- main
permissions:
contents: write
jobs:
deploy-gh-pages:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
# 如果你文档需要 Git 子模块,取消注释下一行
# submodules: true
- name: 设置 pnpm
uses: pnpm/action-setup@v4
- name: 设置 Node.js
uses: actions/setup-node@v4
with:
node-version: 22
cache: pnpm
- name: 安装依赖
run: |
corepack enable
pnpm install --frozen-lockfile
- name: 构建文档
env:
NODE_OPTIONS: --max_old_space_size=8192
run: |-
pnpm run docs:build
> src/.vuepress/dist/.nojekyll
- name: 部署文档
uses: JamesIves/github-pages-deploy-action@v4
with:
# 部署文档
branch: gh-pages
folder: src/.vuepress/dist

5
.gitignore vendored Normal file
View File

@ -0,0 +1,5 @@
node_modules/
src/.vuepress/.cache/
src/.vuepress/.temp/
src/.vuepress/dist/

20
package.json Normal file
View File

@ -0,0 +1,20 @@
{
"name": "life-notes",
"description": "日常笔记",
"version": "1.0.0",
"license": "MIT",
"type": "module",
"scripts": {
"docs:build": "vuepress-vite build src",
"docs:clean-dev": "vuepress-vite dev src --clean-cache",
"docs:dev": "vuepress-vite dev src",
"docs:update-package": "pnpm dlx vp-update"
},
"devDependencies": {
"@vuepress/bundler-vite": "2.0.0-rc.19",
"sass-embedded": "^1.83.0",
"vue": "^3.5.13",
"vuepress": "2.0.0-rc.19",
"vuepress-theme-hope": "2.0.0-rc.71"
}
}

4497
pnpm-lock.yaml Normal file

File diff suppressed because it is too large Load Diff

18
src/.vuepress/config.ts Normal file
View File

@ -0,0 +1,18 @@
import { defineUserConfig } from "vuepress";
import theme from "./theme.js";
export default defineUserConfig({
base: "/",
lang: "zh-CN",
title: "博客演示",
description: "vuepress-theme-hope 的博客演示",
plugins: [
],
theme,
// 和 PWA 一起启用
shouldPrefetch: true,
});

51
src/.vuepress/navbar.ts Normal file
View File

@ -0,0 +1,51 @@
import { navbar } from "vuepress-theme-hope";
export default navbar([
"/",
"/demo/",
// {
// text: "博文",
// icon: "pen-to-square",
// prefix: "/posts/",
// children: [
// {
// text: "苹果",
// icon: "pen-to-square",
// prefix: "apple/",
// children: [
// { text: "苹果1", icon: "pen-to-square", link: "1" },
// { text: "苹果2", icon: "pen-to-square", link: "2" },
// "3",
// "4",
// ],
// },
// {
// text: "香蕉",
// icon: "pen-to-square",
// prefix: "banana/",
// children: [
// {
// text: "香蕉 1",
// icon: "pen-to-square",
// link: "1",
// },
// {
// text: "香蕉 2",
// icon: "pen-to-square",
// link: "2",
// },
// "3",
// "4",
// ],
// },
// { text: "樱桃", icon: "pen-to-square", link: "cherry" },
// { text: "火龙果", icon: "pen-to-square", link: "dragonfruit" },
// "strawberry",
// ],
// },
// {
// text: "V2 文档",
// icon: "book",
// link: "https://theme-hope.vuejs.press/zh/",
// },
]);

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 272 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 128 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 92 KiB

View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="1200" height="1200" class="icon" viewBox="0 0 3280.944 2800"><path fill="#41b883" d="M1645.332 601.004h375.675L1081.82 2238.478 142.636 601.004h718.477l220.708 379.704 216.013-379.704z"/><path fill="#41b883" d="M142.636 601.004l939.185 1637.474 939.186-1637.474h-375.675l-563.51 982.484-568.208-982.484z"/><path fill="#35495e" d="M513.188 601.004l568.207 987.23 563.511-987.23h-347.498l-216.013 379.704-220.708-379.704zM1607.792 1311.83l594.678 2.293 187.353-316.325-598.662 2.292zM2198.506 1909.57C2867.436 732.7 2939.502 605.426 2937.874 603.78c-.715-.723 45.303-1.314 102.262-1.314s103.562.428 103.562.951c0 .523-208.57 367.978-463.491 816.567L2216.715 2235.6l-102.1.596-102.102.596z"/><path fill="#41b883" d="M1680.563 2233.328c0-1.34 168.208-298.145 440.375-777.048a4135645.775 4135645.775 0 00337.619-594.19l146.13-257.25 170.746-.04 170.747-.04-5.536 9.741c-3.044 5.358-43.727 77.302-90.407 159.875-85.356 150.992-337.562 595.163-656.602 1156.373l-172 302.559-170.536.588c-93.795.322-170.536.069-170.536-.567z"/><path fill="#35495e" d="M1429.783 1625.351l594.679 2.292 187.353-316.324-598.662 2.292z"/><path fill="#41b883" d="M1524.207 1464.903l608.285 6.877 173.746-320.909h-619.072z"/></svg>

After

Width:  |  Height:  |  Size: 1.2 KiB

93
src/.vuepress/sidebar.ts Normal file
View File

@ -0,0 +1,93 @@
import { sidebar } from "vuepress-theme-hope";
export default sidebar({
"/": [
"",
"intro",
// {
// text: "RabbitMQ笔记",
// icon: "laptop-code",
// prefix: "RabbitMQDocs/",
// link: "RabbitMQDocs/",
// collapsible: true,
// children: "structure",
// },
// {
// text: "SpringBootDocs",
// icon: "book",
// prefix: "SpringBootDocs/",
// link: "SpringBootDocs/",
// collapsible: true,
// children: "structure",
// },
// {
// text: "VueDocs",
// icon: "book",
// prefix: "VueDocs/",
// link: "VueDocs/",
// collapsible: true,
// children: "structure",
// },
// {
// text: "DistributedDocs",
// icon: "book",
// prefix: "DistributedDocs/",
// link: "DistributedDocs/",
// collapsible: true,
// children: "structure",
// },
// {
// text: "DockerDocs",
// icon: "book",
// prefix: "DockerDocs/",
// link: "DockerDocs/",
// collapsible: true,
// children: "structure",
// },
// {
// text: "CloudDocs",
// icon: "book",
// prefix: "CloudDocs/",
// link: "CloudDocs/",
// collapsible: true,
// children: "structure",
// },
// {
// text: "ServerDocs",
// icon: "book",
// prefix: "ServerDocs/",
// link: "ServerDocs/",
// collapsible: true,
// children: "structure",
// },
// {
// text: "NGINXDocs",
// icon: "book",
// prefix: "NGINXDocs/",
// link: "NGINXDocs/",
// collapsible: true,
// children: "structure",
// },
// {
// text: "前端Docs",
// icon: "book",
// prefix: "前端Docs/",
// link: "前端Docs/",
// collapsible: true,
// children: "structure",
// },
// {
// text: "自动化部署Docs",
// icon: "book",
// prefix: "自动化部署Docs/",
// link: "自动化部署Docs/",
// collapsible: true,
// children: "structure",
// },
{
text: "幻灯片",
icon: "person-chalkboard",
link: "https://ecosystem.vuejs.press/zh/plugins/markdown/revealjs/demo.html",
},
],
});

View File

@ -0,0 +1,3 @@
// you can change config here
$theme-color: #096dd9;
$theme-colors: #2196f3, #f26d6d, #3eaf7c, #fb9b5f;

View File

@ -0,0 +1 @@
// place your custom styles here

View File

@ -0,0 +1 @@
// you can change colors here

239
src/.vuepress/theme.ts Normal file
View File

@ -0,0 +1,239 @@
import { hopeTheme } from "vuepress-theme-hope";
import navbar from "./navbar.js";
import sidebar from "./sidebar.js";
export default hopeTheme(
{
hostname: "https://mister-hope.github.io",
author: {
name: "Mr.Hope",
url: "https://mister-hope.com",
},
fullscreen: true,
logo: "https://theme-hope-assets.vuejs.press/logo.svg",
repo: "vuepress-theme-hope/vuepress-theme-hope",
docsDir: "src",
// 导航栏
navbar,
// 侧边栏
sidebar,
// 页脚
footer: "默认页脚",
displayFooter: true,
// 博客相关
blog: {
description: "一个前端开发者",
intro: "/intro.html",
medias: {
Baidu: "https://example.com",
BiliBili: "https://example.com",
Bitbucket: "https://example.com",
Dingding: "https://example.com",
Discord: "https://example.com",
Dribbble: "https://example.com",
Email: "mailto:info@example.com",
Evernote: "https://example.com",
Facebook: "https://example.com",
Flipboard: "https://example.com",
Gitee: "https://example.com",
GitHub: "https://example.com",
Gitlab: "https://example.com",
Gmail: "mailto:info@example.com",
Instagram: "https://example.com",
Lark: "https://example.com",
Lines: "https://example.com",
Linkedin: "https://example.com",
Pinterest: "https://example.com",
Pocket: "https://example.com",
QQ: "https://example.com",
Qzone: "https://example.com",
Reddit: "https://example.com",
Rss: "https://example.com",
Steam: "https://example.com",
Twitter: "https://example.com",
Wechat: "https://example.com",
Weibo: "https://example.com",
Whatsapp: "https://example.com",
Youtube: "https://example.com",
Zhihu: "https://example.com",
VuePressThemeHope: {
icon: "https://theme-hope-assets.vuejs.press/logo.svg",
link: "https://theme-hope.vuejs.press",
},
},
},
// 加密配置
encrypt: {
config: {
"/demo/encrypt.html": {
hint: "Password: 1234",
password: "1234",
},
},
},
// 多语言配置
metaLocales: {
editLink: "在 GitHub 上编辑此页",
},
// 如果想要实时查看任何改变,启用它。注: 这对更新性能有很大负面影响
// hotReload: true,
// 此处开启了很多功能用于演示,你应仅保留用到的功能。
markdown: {
align: true,
attrs: true,
codeTabs: true,
component: true,
demo: true,
figure: true,
gfm: true,
imgLazyload: true,
imgSize: true,
include: true,
mark: true,
plantuml: true,
spoiler: true,
stylize: [
{
matcher: "Recommended",
replacer: ({ tag }) => {
if (tag === "em")
return {
tag: "Badge",
attrs: { type: "tip" },
content: "Recommended",
};
},
},
],
sub: true,
sup: true,
tabs: true,
tasklist: true,
vPre: true,
// 取消注释它们如果你需要 TeX 支持
// markdownMath: {
// // 启用前安装 katex
// type: "katex",
// // 或者安装 mathjax-full
// type: "mathjax",
// },
// 如果你需要幻灯片,安装 @vuepress/plugin-revealjs 并取消下方注释
// revealjs: {
// plugins: ["highlight", "math", "search", "notes", "zoom"],
// },
// 在启用之前安装 chart.js
// chartjs: true,
// insert component easily
// 在启用之前安装 echarts
// echarts: true,
// 在启用之前安装 flowchart.ts
// flowchart: true,
// 在启用之前安装 mermaid
// mermaid: true,
// playground: {
// presets: ["ts", "vue"],
// },
// 在启用之前安装 @vue/repl
// vuePlayground: true,
// 在启用之前安装 sandpack-vue3
// sandpack: true,
},
// 在这里配置主题提供的插件
plugins: {
blog: true,
// 启用之前需安装 @waline/client
// 警告: 这是一个仅供演示的测试服务,在生产环境中请自行部署并使用自己的服务!
// comment: {
// provider: "Waline",
// serverURL: "https://waline-comment.vuejs.press",
// },
components: {
components: ["Badge", "VPCard"],
},
icon: {
prefix: "fa6-solid:",
},
// 如果你需要 PWA。安装 @vuepress/plugin-pwa 并取消下方注释
// pwa: {
// favicon: "/favicon.ico",
// cacheHTML: true,
// cacheImage: true,
// appendBase: true,
// apple: {
// icon: "/assets/icon/apple-icon-152.png",
// statusBarColor: "black",
// },
// msTile: {
// image: "/assets/icon/ms-icon-144.png",
// color: "#ffffff",
// },
// manifest: {
// icons: [
// {
// src: "/assets/icon/chrome-mask-512.png",
// sizes: "512x512",
// purpose: "maskable",
// type: "image/png",
// },
// {
// src: "/assets/icon/chrome-mask-192.png",
// sizes: "192x192",
// purpose: "maskable",
// type: "image/png",
// },
// {
// src: "/assets/icon/chrome-512.png",
// sizes: "512x512",
// type: "image/png",
// },
// {
// src: "/assets/icon/chrome-192.png",
// sizes: "192x192",
// type: "image/png",
// },
// ],
// shortcuts: [
// {
// name: "Demo",
// short_name: "Demo",
// url: "/demo/",
// icons: [
// {
// src: "/assets/icon/guide-maskable.png",
// sizes: "192x192",
// purpose: "maskable",
// type: "image/png",
// },
// ],
// },
// ],
// },
// },
},
},
{ custom: true }
);

48
src/README.md Normal file
View File

@ -0,0 +1,48 @@
---
home: true
layout: BlogHome
icon: house
title: 博客主页
heroImage: https://theme-hope-assets.vuejs.press/logo.svg
heroText: 你博客的名称
heroFullScreen: true
tagline: 你可以在这里放置你的口号与标语
projects:
- icon: folder-open
name: 项目名称
desc: 项目详细描述
link: https://你的项目链接
- icon: link
name: 链接名称
desc: 链接详细描述
link: https://链接地址
- icon: book
name: 书籍名称
desc: 书籍详细描述
link: https://你的书籍链接
- icon: newspaper
name: 文章名称
desc: 文章详细描述
link: https://你的文章链接
- icon: user-group
name: 伙伴名称
desc: 伙伴详细介绍
link: https://你的伙伴链接
- icon: https://theme-hope-assets.vuejs.press/logo.svg
name: 自定义项目
desc: 自定义详细介绍
link: https://你的自定义链接
footer: 自定义你的页脚文字
---
这是一个博客主页的案例。
要使用此布局,你应该在页面前端设置 `layout: BlogHome``home: true`
相关配置文档请见 [博客主页](https://theme-hope.vuejs.press/zh/guide/blog/home.html)。

8
src/intro.md Normal file
View File

@ -0,0 +1,8 @@
---
icon: circle-info
cover: /assets/images/cover3.jpg
---
# 介绍页
将你的个人介绍和档案放置在此处。

14
tsconfig.json Normal file
View File

@ -0,0 +1,14 @@
{
"compilerOptions": {
"module": "NodeNext",
"moduleResolution": "NodeNext",
"target": "ES2022"
},
"include": [
"src/.vuepress/**/*.ts",
"src/.vuepress/**/*.vue"
],
"exclude": [
"node_modules"
]
}