-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
25 changed files
with
6,477 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
|
||
name: 部署博客 | ||
|
||
on: | ||
push: | ||
branches: | ||
# 确保这是你正在使用的分支名称 | ||
- main | ||
|
||
jobs: | ||
deploy-gh-pages: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
# 如果你文档需要 Git 子模块,取消注释下一行 | ||
# submodules: true | ||
|
||
|
||
|
||
- name: 设置 Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18 | ||
cache: yarn | ||
|
||
- name: 安装依赖 | ||
run: yarn install --frozen-lockfile | ||
|
||
- name: 构建文档 | ||
env: | ||
NODE_OPTIONS: --max_old_space_size=8192 | ||
run: |- | ||
yarn run docs:build | ||
> src/.vuepress/dist/.nojekyll | ||
- name: 部署文档 | ||
uses: JamesIves/github-pages-deploy-action@v4 | ||
with: | ||
# 这是文档部署到的分支名称 | ||
branch: gh-pages | ||
folder: src/.vuepress/dist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
# zihu.github.io | ||
show zihu | ||
# my-blog-giscus | ||
这是一个vuepress-theme-hope主题驱动的博客 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{ | ||
"name": "zihu-blog", | ||
"version": "2.0.0", | ||
"description": "personal blog", | ||
"license": "MIT", | ||
"type": "module", | ||
"scripts": { | ||
"docs:build": "vuepress build src", | ||
"docs:clean-dev": "vuepress dev src --clean-cache", | ||
"docs:dev": "vuepress dev src", | ||
"docs:update-package": "yarn dlx vp-update" | ||
}, | ||
"devDependencies": { | ||
"@vuepress/client": "2.0.0-beta.61", | ||
"reveal.js": "^5.0.2", | ||
"vue": "^3.2.47", | ||
"vuepress": "2.0.0-beta.61", | ||
"vuepress-plugin-search-pro": "^2.0.0-beta.197", | ||
"vuepress-theme-hope": "2.0.0-beta.197" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
import {defineUserConfig} from "vuepress"; | ||
import theme from "./theme.js"; | ||
import {searchProPlugin} from "vuepress-plugin-search-pro"; | ||
|
||
// @ts-ignore | ||
// @ts-ignore | ||
// @ts-ignore | ||
export default defineUserConfig({ | ||
base: "/", | ||
head: [ | ||
[ | ||
"link", | ||
{rel: "icon", href: "/favicon.ico"}, | ||
], | ||
[ | ||
`script`, {}, ` | ||
var _hmt = _hmt || []; | ||
(function() { | ||
var hm = document.createElement("script"); | ||
hm.src = "https://hm.baidu.com/hm.js?87276829dc72e9eeef7c53e10550b458"; | ||
var s = document.getElementsByTagName("script")[0]; | ||
s.parentNode.insertBefore(hm, s); | ||
})(); | ||
` | ||
] | ||
], | ||
locales: { | ||
"/": { | ||
lang: "zh-CN", | ||
title: "紫狐", | ||
description: "紫狐的个人博客", | ||
}, | ||
}, | ||
|
||
theme, | ||
plugins: [ | ||
searchProPlugin({ | ||
// 索引全部内容 | ||
indexContent: true, | ||
// 为分类和标签添加索引 | ||
customFields: [ | ||
{ | ||
//@ts-ignore | ||
getter: (page) => page.frontmatter.category, | ||
formatter: "分类:$content", | ||
}, | ||
{ | ||
//@ts-ignore | ||
getter: (page) => page.frontmatter.tag, | ||
formatter: "标签:$content", | ||
}, | ||
], | ||
}), | ||
] | ||
|
||
// Enable it with pwa | ||
// shouldPrefetch: false, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from "./zh.js"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import {navbar} from "vuepress-theme-hope"; | ||
|
||
export const zhNavbar = navbar([ | ||
{ | ||
text: "技术文章", | ||
icon: "build", | ||
link: "/category/技术日志/", | ||
}, | ||
{ | ||
text: "其它分类", | ||
icon: "guide", | ||
children: [ | ||
{ | ||
text: "Linux", | ||
icon: "linux", | ||
link: "/category/Linux/" | ||
}, | ||
] | ||
}, | ||
{ | ||
text: "时间轴", | ||
icon: "time", | ||
link: "/timeline", | ||
}, | ||
]); |
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from "./zh.js"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { sidebar } from "vuepress-theme-hope"; | ||
|
||
export const zhSidebar = sidebar({ | ||
"/NaN": [ | ||
{ | ||
text: "文章", | ||
icon: "note", | ||
prefix: "posts/", | ||
children: "structure", | ||
}, | ||
"intro", | ||
], | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
// you can change config here | ||
$colors: #c0392b, #d35400, #f39c12, #27ae60, #16a085, #2980b9, #8e44ad, #2c3e50, | ||
#7f8c8d !default; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
// place your custom styles here | ||
// 文章摘要样式修改,确保文字永远在图片下面 | ||
.article-excerpt { | ||
p { | ||
display: flex; | ||
justify-content: center; | ||
flex-direction: column; | ||
} | ||
img { | ||
margin-bottom: 5px; | ||
border-radius: 1%; | ||
} | ||
} | ||
|
||
// 解决文章过少时个人信息卡片顶入导航栏的问题 | ||
.page .blog-info-wrapper { | ||
margin-top: 0.5rem; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
// you can change colors here | ||
$theme-color: #096dd9; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
import {hopeTheme} from "vuepress-theme-hope"; | ||
import {zhNavbar} from "./navbar"; | ||
import {zhSidebar} from "./sidebar"; | ||
|
||
export default hopeTheme({ | ||
hostname: "https://zihu.github.io", | ||
|
||
author: { | ||
name: "Mr.Hope", | ||
url: "https://mister-hope.com", | ||
}, | ||
|
||
iconAssets: "iconfont", | ||
|
||
logo: "/logo.png", | ||
|
||
docsDir: "docs", | ||
editLink: false, | ||
blog: { | ||
medias: { | ||
GitHub: "https://github.com/zihu97", | ||
Email: "mailto:[email protected]", | ||
}, | ||
}, | ||
|
||
locales: { | ||
"/": { | ||
navbar: zhNavbar, | ||
|
||
sidebar: zhSidebar, | ||
|
||
footer: "哈哈哈哈", | ||
|
||
displayFooter: false, | ||
|
||
blog: { | ||
description: "一个内核爱好者", | ||
intro: "/intro.html", | ||
}, | ||
|
||
// page meta | ||
metaLocales: { | ||
editLink: "在 GitHub 上编辑此页", | ||
}, | ||
}, | ||
}, | ||
|
||
plugins: { | ||
comment: { | ||
provider: "Giscus", | ||
repo: "zihu97/zihu.github.io", | ||
repoId: "R_kgDOMMvIMA", | ||
category: "Announcements", | ||
categoryId: "DIC_kwDOMMvIMM4CgSKR", | ||
inputPosition: "top", | ||
lazyLoading: true, | ||
}, | ||
readingTime: { | ||
wordPerMinute: 150 | ||
}, | ||
feed: { | ||
rss: true, | ||
}, | ||
blog: true, | ||
// all features are enabled for demo, only preserve features you need here | ||
mdEnhance: { | ||
align: true, | ||
attrs: true, | ||
chart: true, | ||
codetabs: true, | ||
demo: true, | ||
echarts: true, | ||
figure: true, | ||
flowchart: true, | ||
gfm: true, | ||
imgLazyload: true, | ||
imgSize: true, | ||
include: true, | ||
katex: true, | ||
mark: true, | ||
mermaid: true, | ||
presentation: { | ||
plugins: ["highlight", "math", "search", "notes", "zoom"], | ||
}, | ||
stylize: [ | ||
{ | ||
matcher: "Recommended", | ||
replacer: ({tag}) => { | ||
if (tag === "em") | ||
return { | ||
tag: "Badge", | ||
attrs: {type: "tip"}, | ||
content: "Recommended", | ||
}; | ||
}, | ||
}, | ||
], | ||
sub: true, | ||
sup: true, | ||
tabs: true, | ||
vPre: true, | ||
vuePlayground: true, | ||
}, | ||
}, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
--- | ||
home: true | ||
layout: BlogHome | ||
icon: home | ||
title: 博客主页 | ||
heroImage: /logo.png | ||
heroText: 紫狐 | ||
bgImage: /snow.png | ||
heroFullScreen: true | ||
tagline: 大家好啊 | ||
projects: | ||
- icon: /golang.png | ||
name: Go学习文档站 | ||
desc: Go爱好者驱动的学习文档站 | ||
link: https://golang.halfiisland.com/ | ||
|
||
- icon: /giscus.png | ||
name: Giscus | ||
desc: 由 GitHub Discussions 驱动的评论系统 | ||
link: https://giscus.app/zh-CN | ||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- | ||
icon: profile | ||
article: false | ||
--- | ||
|
||
# 我的路 | ||
|
||
路漫漫其修远兮,吾将上下而求索 | ||
<!-- more --> |
Oops, something went wrong.