-
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
45 changed files
with
3,340 additions
and
89 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,78 @@ | ||
# Sample workflow for building and deploying a Hugo site to GitHub Pages | ||
name: Deploy Hugo site to Pages | ||
|
||
on: | ||
# Runs on pushes targeting the default branch | ||
push: | ||
branches: | ||
- main | ||
|
||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages | ||
permissions: | ||
contents: read | ||
pages: write | ||
id-token: write | ||
|
||
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. | ||
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. | ||
concurrency: | ||
group: "pages" | ||
cancel-in-progress: false | ||
|
||
# Default to bash | ||
defaults: | ||
run: | ||
shell: bash | ||
|
||
jobs: | ||
# Build job | ||
build: | ||
runs-on: ubuntu-latest | ||
env: | ||
HUGO_VERSION: 0.138.0 | ||
steps: | ||
- name: Install Hugo CLI | ||
run: | | ||
wget -O ${{ runner.temp }}/hugo.deb https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.deb \ | ||
&& sudo dpkg -i ${{ runner.temp }}/hugo.deb | ||
- name: Install Dart Sass | ||
run: sudo snap install dart-sass | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
submodules: recursive | ||
fetch-depth: 0 | ||
- name: Setup Pages | ||
id: pages | ||
uses: actions/configure-pages@v5 | ||
- name: Install Node.js dependencies | ||
run: "[[ -f package-lock.json || -f npm-shrinkwrap.json ]] && npm ci || true" | ||
- name: Build with Hugo | ||
env: | ||
HUGO_CACHEDIR: ${{ runner.temp }}/hugo_cache | ||
HUGO_ENVIRONMENT: production | ||
TZ: America/Los_Angeles | ||
run: | | ||
hugo \ | ||
--gc \ | ||
--minify \ | ||
--baseURL "${{ steps.pages.outputs.base_url }}/" | ||
- name: Upload artifact | ||
uses: actions/upload-pages-artifact@v3 | ||
with: | ||
path: ./public | ||
|
||
# Deployment job | ||
deploy: | ||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
runs-on: ubuntu-latest | ||
needs: build | ||
steps: | ||
- name: Deploy to GitHub Pages | ||
id: deployment | ||
uses: actions/deploy-pages@v4 |
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,6 @@ | ||
.post-content pre, | ||
code { | ||
font-family: "JetBrains Mono", monospace; | ||
font-size: 1rem; | ||
line-height: 1.2; | ||
} |
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,175 @@ | ||
/* Background */ .bg { color:#3760bf;background-color:#e1e2e7; } | ||
/* PreWrapper */ .chroma { color:#3760bf;background-color:#e1e2e7; } | ||
/* Other */ .chroma .x { color: #000 } | ||
/* Error */ .chroma .err { color:#c64343 } | ||
/* CodeLine */ .chroma .cl { color: #000 } | ||
/* LineLink */ .chroma .lnlinks { outline:none;text-decoration:none;color:inherit } | ||
/* LineTableTD */ .chroma .lntd { vertical-align:top;padding:0;margin:0;border:0; } | ||
/* LineTable */ .chroma .lntable { border-spacing:0;padding:0;margin:0;border:0; } | ||
/* LineHighlight */ .chroma .hl { background-color:#a1a6c5 } | ||
/* LineNumbersTable */ .chroma .lnt { white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#6172b0 } | ||
/* LineNumbers */ .chroma .ln { white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#6172b0 } | ||
/* Line */ .chroma .line { display:flex; } | ||
/* Keyword */ .chroma .k { color:#9854f1 } | ||
/* KeywordConstant */ .chroma .kc { color:#8c6c3e } | ||
/* KeywordDeclaration */ .chroma .kd { color:#9d7cd8 } | ||
/* KeywordNamespace */ .chroma .kn { color:#007197 } | ||
/* KeywordPseudo */ .chroma .kp { color:#9854f1 } | ||
/* KeywordReserved */ .chroma .kr { color:#9854f1 } | ||
/* KeywordType */ .chroma .kt { color:#0db9d7 } | ||
/* Name */ .chroma .n { color: #000 } | ||
/* NameAttribute */ .chroma .na { color:#2e7de9 } | ||
/* NameBuiltin */ .chroma .nb { color:#587539 } | ||
/* NameBuiltinPseudo */ .chroma .bp { color:#587539 } | ||
/* NameClass */ .chroma .nc { color:#b15c00 } | ||
/* NameConstant */ .chroma .no { color:#b15c00 } | ||
/* NameDecorator */ .chroma .nd { color:#2e7de9;font-weight:bold } | ||
/* NameEntity */ .chroma .ni { color:#007197 } | ||
/* NameException */ .chroma .ne { color:#8c6c3e } | ||
/* NameFunction */ .chroma .nf { color:#2e7de9 } | ||
/* NameFunctionMagic */ .chroma .fm { color:#2e7de9 } | ||
/* NameLabel */ .chroma .nl { color:#587539 } | ||
/* NameNamespace */ .chroma .nn { color:#8c6c3e } | ||
/* NameOther */ .chroma .nx { color: #000 } | ||
/* NameProperty */ .chroma .py { color:#8c6c3e } | ||
/* NameTag */ .chroma .nt { color:#9854f1 } | ||
/* NameVariable */ .chroma .nv { color: #000 } | ||
/* NameVariableClass */ .chroma .vc { color: #000 } | ||
/* NameVariableGlobal */ .chroma .vg { color: #000 } | ||
/* NameVariableInstance */ .chroma .vi { color: #000 } | ||
/* NameVariableMagic */ .chroma .vm { color: #000 } | ||
/* Literal */ .chroma .l { color: #000 } | ||
/* LiteralDate */ .chroma .ld { color: #000 } | ||
/* LiteralString */ .chroma .s { color:#587539 } | ||
/* LiteralStringAffix */ .chroma .sa { color:#9d7cd8 } | ||
/* LiteralStringBacktick */ .chroma .sb { color:#587539 } | ||
/* LiteralStringChar */ .chroma .sc { color:#587539 } | ||
/* LiteralStringDelimiter */ .chroma .dl { color:#2e7de9 } | ||
/* LiteralStringDoc */ .chroma .sd { color:#a1a6c5 } | ||
/* LiteralStringDouble */ .chroma .s2 { color:#587539 } | ||
/* LiteralStringEscape */ .chroma .se { color:#2e7de9 } | ||
/* LiteralStringHeredoc */ .chroma .sh { color:#a1a6c5 } | ||
/* LiteralStringInterpol */ .chroma .si { color:#587539 } | ||
/* LiteralStringOther */ .chroma .sx { color:#587539 } | ||
/* LiteralStringRegex */ .chroma .sr { color:#007197 } | ||
/* LiteralStringSingle */ .chroma .s1 { color:#587539 } | ||
/* LiteralStringSymbol */ .chroma .ss { color:#587539 } | ||
/* LiteralNumber */ .chroma .m { color:#8c6c3e } | ||
/* LiteralNumberBin */ .chroma .mb { color:#8c6c3e } | ||
/* LiteralNumberFloat */ .chroma .mf { color:#8c6c3e } | ||
/* LiteralNumberHex */ .chroma .mh { color:#8c6c3e } | ||
/* LiteralNumberInteger */ .chroma .mi { color:#8c6c3e } | ||
/* LiteralNumberIntegerLong */ .chroma .il { color:#8c6c3e } | ||
/* LiteralNumberOct */ .chroma .mo { color:#8c6c3e } | ||
/* Operator */ .chroma .o { color:#587539;font-weight:bold } | ||
/* OperatorWord */ .chroma .ow { color:#587539;font-weight:bold } | ||
/* Punctuation */ .chroma .p { color: #000 } | ||
/* Comment */ .chroma .c { color:#a1a6c5;font-style:italic } | ||
/* CommentHashbang */ .chroma .ch { color:#a1a6c5;font-style:italic } | ||
/* CommentMultiline */ .chroma .cm { color:#a1a6c5;font-style:italic } | ||
/* CommentSingle */ .chroma .c1 { color:#a1a6c5;font-style:italic } | ||
/* CommentSpecial */ .chroma .cs { color:#a1a6c5;font-style:italic } | ||
/* CommentPreproc */ .chroma .cp { color:#a1a6c5;font-style:italic } | ||
/* CommentPreprocFile */ .chroma .cpf { color:#a1a6c5;font-weight:bold;font-style:italic } | ||
/* Generic */ .chroma .g { color: #000 } | ||
/* GenericDeleted */ .chroma .gd { color:#c64343;background-color:#e9e9ed } | ||
/* GenericEmph */ .chroma .ge { font-style:italic } | ||
/* GenericError */ .chroma .gr { color:#c64343 } | ||
/* GenericHeading */ .chroma .gh { color:#8c6c3e;font-weight:bold } | ||
/* GenericInserted */ .chroma .gi { color:#587539;background-color:#e9e9ed } | ||
/* GenericOutput */ .chroma .go { color: #000 } | ||
/* GenericPrompt */ .chroma .gp { color: #000 } | ||
/* GenericStrong */ .chroma .gs { font-weight:bold } | ||
/* GenericSubheading */ .chroma .gu { color:#8c6c3e;font-weight:bold } | ||
/* GenericTraceback */ .chroma .gt { color:#c64343 } | ||
/* GenericUnderline */ .chroma .gl { text-decoration:underline } | ||
/* TextWhitespace */ .chroma .w { color: #000 } | ||
|
||
.dark { | ||
/* Background */ .bg { color:#e6edf3;background-color:#0d1117; } | ||
/* PreWrapper */ .chroma { color:#e6edf3;background-color:#0d1117; } | ||
/* Other */ .chroma .x { color: #fff } | ||
/* Error */ .chroma .err { color:#f85149 } | ||
/* CodeLine */ .chroma .cl { color: #fff } | ||
/* LineLink */ .chroma .lnlinks { outline:none;text-decoration:none;color:inherit } | ||
/* LineTableTD */ .chroma .lntd { vertical-align:top;padding:0;margin:0;border:0; } | ||
/* LineTable */ .chroma .lntable { border-spacing:0;padding:0;margin:0;border:0; } | ||
/* LineHighlight */ .chroma .hl { background-color:#6e7681 } | ||
/* LineNumbersTable */ .chroma .lnt { white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#737679 } | ||
/* LineNumbers */ .chroma .ln { white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#6e7681 } | ||
/* Line */ .chroma .line { display:flex; } | ||
/* Keyword */ .chroma .k { color:#ff7b72 } | ||
/* KeywordConstant */ .chroma .kc { color:#79c0ff } | ||
/* KeywordDeclaration */ .chroma .kd { color:#ff7b72 } | ||
/* KeywordNamespace */ .chroma .kn { color:#ff7b72 } | ||
/* KeywordPseudo */ .chroma .kp { color:#79c0ff } | ||
/* KeywordReserved */ .chroma .kr { color:#ff7b72 } | ||
/* KeywordType */ .chroma .kt { color:#ff7b72 } | ||
/* Name */ .chroma .n { color: #fff } | ||
/* NameAttribute */ .chroma .na { color: #fff } | ||
/* NameBuiltin */ .chroma .nb { color: #fff } | ||
/* NameBuiltinPseudo */ .chroma .bp { color: #fff } | ||
/* NameClass */ .chroma .nc { color:#f0883e;font-weight:bold } | ||
/* NameConstant */ .chroma .no { color:#79c0ff;font-weight:bold } | ||
/* NameDecorator */ .chroma .nd { color:#d2a8ff;font-weight:bold } | ||
/* NameEntity */ .chroma .ni { color:#ffa657 } | ||
/* NameException */ .chroma .ne { color:#f0883e;font-weight:bold } | ||
/* NameFunction */ .chroma .nf { color:#d2a8ff;font-weight:bold } | ||
/* NameFunctionMagic */ .chroma .fm { color: #fff } | ||
/* NameLabel */ .chroma .nl { color:#79c0ff;font-weight:bold } | ||
/* NameNamespace */ .chroma .nn { color:#ff7b72 } | ||
/* NameOther */ .chroma .nx { color: #fff } | ||
/* NameProperty */ .chroma .py { color:#79c0ff } | ||
/* NameTag */ .chroma .nt { color:#7ee787 } | ||
/* NameVariable */ .chroma .nv { color:#79c0ff } | ||
/* NameVariableClass */ .chroma .vc { color: #fff } | ||
/* NameVariableGlobal */ .chroma .vg { color: #fff } | ||
/* NameVariableInstance */ .chroma .vi { color: #fff } | ||
/* NameVariableMagic */ .chroma .vm { color: #fff } | ||
/* Literal */ .chroma .l { color:#a5d6ff } | ||
/* LiteralDate */ .chroma .ld { color:#79c0ff } | ||
/* LiteralString */ .chroma .s { color:#a5d6ff } | ||
/* LiteralStringAffix */ .chroma .sa { color:#79c0ff } | ||
/* LiteralStringBacktick */ .chroma .sb { color:#a5d6ff } | ||
/* LiteralStringChar */ .chroma .sc { color:#a5d6ff } | ||
/* LiteralStringDelimiter */ .chroma .dl { color:#79c0ff } | ||
/* LiteralStringDoc */ .chroma .sd { color:#a5d6ff } | ||
/* LiteralStringDouble */ .chroma .s2 { color:#a5d6ff } | ||
/* LiteralStringEscape */ .chroma .se { color:#79c0ff } | ||
/* LiteralStringHeredoc */ .chroma .sh { color:#79c0ff } | ||
/* LiteralStringInterpol */ .chroma .si { color:#a5d6ff } | ||
/* LiteralStringOther */ .chroma .sx { color:#a5d6ff } | ||
/* LiteralStringRegex */ .chroma .sr { color:#79c0ff } | ||
/* LiteralStringSingle */ .chroma .s1 { color:#a5d6ff } | ||
/* LiteralStringSymbol */ .chroma .ss { color:#a5d6ff } | ||
/* LiteralNumber */ .chroma .m { color:#a5d6ff } | ||
/* LiteralNumberBin */ .chroma .mb { color:#a5d6ff } | ||
/* LiteralNumberFloat */ .chroma .mf { color:#a5d6ff } | ||
/* LiteralNumberHex */ .chroma .mh { color:#a5d6ff } | ||
/* LiteralNumberInteger */ .chroma .mi { color:#a5d6ff } | ||
/* LiteralNumberIntegerLong */ .chroma .il { color:#a5d6ff } | ||
/* LiteralNumberOct */ .chroma .mo { color:#a5d6ff } | ||
/* Operator */ .chroma .o { color:#ff7b72;font-weight:bold } | ||
/* OperatorWord */ .chroma .ow { color:#ff7b72;font-weight:bold } | ||
/* Punctuation */ .chroma .p { color: #fff } | ||
/* Comment */ .chroma .c { color:#8b949e;font-style:italic } | ||
/* CommentHashbang */ .chroma .ch { color:#8b949e;font-style:italic } | ||
/* CommentMultiline */ .chroma .cm { color:#8b949e;font-style:italic } | ||
/* CommentSingle */ .chroma .c1 { color:#8b949e;font-style:italic } | ||
/* CommentSpecial */ .chroma .cs { color:#8b949e;font-weight:bold;font-style:italic } | ||
/* CommentPreproc */ .chroma .cp { color:#8b949e;font-weight:bold;font-style:italic } | ||
/* CommentPreprocFile */ .chroma .cpf { color:#8b949e;font-weight:bold;font-style:italic } | ||
/* Generic */ .chroma .g { color: #fff } | ||
/* GenericDeleted */ .chroma .gd { color:#ffa198;background-color:#490202 } | ||
/* GenericEmph */ .chroma .ge { font-style:italic } | ||
/* GenericError */ .chroma .gr { color:#ffa198 } | ||
/* GenericHeading */ .chroma .gh { color:#79c0ff;font-weight:bold } | ||
/* GenericInserted */ .chroma .gi { color:#56d364;background-color:#0f5323 } | ||
/* GenericOutput */ .chroma .go { color:#8b949e } | ||
/* GenericPrompt */ .chroma .gp { color:#8b949e } | ||
/* GenericStrong */ .chroma .gs { font-weight:bold } | ||
/* GenericSubheading */ .chroma .gu { color:#79c0ff } | ||
/* GenericTraceback */ .chroma .gt { color:#ff7b72 } | ||
/* GenericUnderline */ .chroma .gl { text-decoration:underline } | ||
/* TextWhitespace */ .chroma .w { color:#6e7681 } | ||
} |
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,22 @@ | ||
--- | ||
title: "关于" | ||
layout: "about" | ||
url: "/about/" | ||
summary: about | ||
--- | ||
|
||
行内数学公式:$a^2 + b^2 = c^2$。 | ||
|
||
块公式, | ||
|
||
$$a^2 + b^2 = c^2$$ | ||
|
||
<div> | ||
$$ | ||
\boldsymbol{x}_{i+1}+\boldsymbol{x}_{i+2}=\boldsymbol{x}_{i+3} | ||
$$ | ||
</div> | ||
|
||
```python | ||
print('Hello World') | ||
``` |
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,6 @@ | ||
--- | ||
title: "归档" | ||
layout: "archives" | ||
url: "/archives/" | ||
summary: archives | ||
--- |
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,8 @@ | ||
--- | ||
title : 'Hugo + PaperMod + Github Pages 搭建一个完善的个人博客(以 Windows11 为例)' | ||
date : 2024-08-04T03:25:53+08:00 | ||
categories : ["通用技术"] | ||
tags : ["博客搭建", "Bilibili"] | ||
--- | ||
|
||
nihao |
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,6 @@ | ||
--- | ||
title: "搜索" # in any language you want | ||
layout: "search" # necessary for search | ||
summary: "search" | ||
placeholder: "搜索" | ||
--- |
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,4 +1,78 @@ | ||
baseURL: https://example.org/ | ||
languageCode: en-us | ||
title: My New Hugo Site | ||
theme: ["PaperMod"] | ||
baseURL: "https://WncFht.github.io/" # 主站的 URL | ||
title: WncFht's Blog # 站点标题 | ||
copyright: "[©2024 WncFht's Blog](https://WncFht.github.io/)" # 网站的版权声明,通常显示在页脚 | ||
theme: PaperMod # 主题 | ||
languageCode: zh-cn # 语言 | ||
|
||
enableInlineShortcodes: true # shortcode,类似于模板变量,可以在写 markdown 的时候便捷地插入,官方文档中有一个视频讲的很通俗 | ||
hasCJKLanguage: true # 是否有 CJK 的字符 | ||
enableRobotsTXT: true # 允许生成 robots.txt | ||
buildDrafts: false # 构建时是否包括草稿 | ||
buildFuture: false # 构建未来发布的内容 | ||
buildExpired: false # 构建过期的内容 | ||
enableEmoji: true # 允许 emoji | ||
pygmentsUseClasses: true | ||
defaultContentLanguage: zh # 顶部首先展示的语言界面 | ||
defaultContentLanguageInSubdir: false # 是否要在地址栏加上默认的语言代码 | ||
|
||
languages: | ||
zh: | ||
languageName: "中文" # 展示的语言名 | ||
weight: 1 # 权重 | ||
taxonomies: # 分类系统 | ||
category: categories | ||
tag: tags | ||
# https://gohugo.io/content-management/menus/#define-in-site-configuration | ||
menus: | ||
main: | ||
- name: 首页 | ||
pageRef: / | ||
weight: 4 # 控制在页面上展示的前后顺序 | ||
- name: 归档 | ||
pageRef: archives/ | ||
weight: 5 | ||
- name: 分类 | ||
pageRef: categories/ | ||
weight: 10 | ||
- name: 标签 | ||
pageRef: tags/ | ||
weight: 10 | ||
- name: 搜索 | ||
pageRef: search/ | ||
weight: 20 | ||
- name: 关于 | ||
pageRef: about/ | ||
weight: 21 | ||
# https://github.com/adityatelange/hugo-PaperMod/wiki/Features#search-page | ||
outputs: | ||
home: | ||
- HTML # 生成的静态页面 | ||
- RSS # 这个其实无所谓 | ||
- JSON # necessary for search, 这里的配置修改好之后,一定要重新生成一下 | ||
params: | ||
assets: | ||
disableHLJS: true | ||
# 搜索 | ||
fuseOpts: | ||
isCaseSensitive: false # 是否大小写敏感 | ||
shouldSort: true # 是否排序 | ||
location: 0 | ||
distance: 1000 | ||
threshold: 0.4 | ||
minMatchCharLength: 0 | ||
# limit: 10 # refer: https://www.fusejs.io/api/methods.html#search | ||
keys: ["title", "permalink", "summary", "content"] | ||
includeMatches: true | ||
markup: | ||
goldmark: | ||
renderer: | ||
unsafe: true # 可以 unsafe,有些 html 标签和样式可能需要 | ||
highlight: | ||
anchorLineNos: false # 不要给行号设置锚标 | ||
codeFences: true # 代码围栏 | ||
noClasses: false # TODO: 不知道干啥的,暂时没必要了解,不影响展示 | ||
lineNos: true # 代码行 | ||
lineNumbersInTable: false # 不要设置成 true,否则如果文章开头是代码的话,摘要会由一大堆数字(即代码行号)开头文章 | ||
# 这里设置 style 没用,得自己加 css | ||
# style: "github-dark" | ||
# style: monokai |
Oops, something went wrong.