Skip to content

Commit

Permalink
Site Update:
Browse files Browse the repository at this point in the history
1. Upgrade Hugo to 0.140.1
2. Sync theme stack with upstream

Content Update:
1. Fix typos.
  • Loading branch information
MegaOwIer committed Dec 26, 2024
1 parent a5f971f commit d3150c6
Show file tree
Hide file tree
Showing 8 changed files with 62 additions and 30 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/deploy-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
with:
hugo-version: 'latest'
extended: true
- name: Setup Gitalk
- name: Setup Google Analytics
env:
GAID: ${{ secrets.googleAnalytics }}
run: |
Expand Down
49 changes: 37 additions & 12 deletions config.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,20 @@
baseurl: https://blog.megaowier.cc
languageCode: zh-cn
paginate: 20
title: "MegaOwIer's Blog"
copyright: MegaOwIer

theme:
- hugo-embed-pdf-shortcode
- stack

# Theme i18n support
# Available values: ar, bn, ca, de, el, en, es, fr, hu, id, it, ja, ko, nl, pt-br, th, uk, zh-cn, zh-hk, zh-tw
DefaultContentLanguage: zh-cn

# Set hasCJKLanguage to true if DefaultContentLanguage is in [zh-cn ja ko]
# This will make .Summary and .WordCount behave correctly for CJK languages.
hasCJKLanguage: true

languages:
zh-cn:
languageName: 中文
Expand All @@ -21,16 +29,13 @@ languages:
# title: موقع تجريبي
# weight: 3

# GA Tracking ID
googleAnalytics: __googleAnalytics__
services:
# GA Tracking ID
googleAnalytics:
id: __googleAnalytics__

# Theme i18n support
# Available values: ar, bn, ca, de, el, en, es, fr, hu, id, it, ja, ko, nl, pt-br, th, uk, zh-cn, zh-hk, zh-tw
DefaultContentLanguage: zh-cn

# Set hasCJKLanguage to true if DefaultContentLanguage is in [zh-cn ja ko]
# This will make .Summary and .WordCount behave correctly for CJK languages.
hasCJKLanguage: true
pagination:
pagerSize: 16

permalinks:
post: /p/:slug/
Expand All @@ -53,6 +58,7 @@ params:
lastUpdated: Jan 02, 2006

sidebar:
compact: false
emoji: 💤
subtitle: |
人大计算机专业本科<br>
Expand All @@ -65,7 +71,6 @@ params:

article:
math: true
toc: true
readingTime: true
license:
enabled: true
Expand All @@ -80,14 +85,21 @@ params:
category: Comments
categoryID: DIC_kwDOIL05cM4CTSHc
mapping: title
strict:
lightTheme:
darkTheme:
reactionsEnabled: 1
emitMetadata: 0
inputPosition:
lang: zh-cn


widgets:
homepage:
- type: search
# - type: archives
# params:
# limit: 5
- type: categories
params:
limit: 10
Expand Down Expand Up @@ -160,7 +172,20 @@ related:

markup:
goldmark:
renderer: ## Set to true if you have HTML content inside Markdown
extensions:
passthrough:
enable: true
delimiters:
block:
- - \[
- \]
- - $$
- $$
inline:
- - \(
- \)
renderer:
## Set to true if you have HTML content inside Markdown
unsafe: true
tableOfContents:
endLevel: 4
Expand Down
14 changes: 14 additions & 0 deletions content/post/autobangumi/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
title: 利用 AutoBangumi 实现自动追番
slug: autobangumi
date: 2024-01-31
lastmod: 2024-02-04
tags:
- NAS
categories:
- DIY
description: 压榨吃灰树莓派的剩余价值(三)
draft: true
---

test
7 changes: 2 additions & 5 deletions content/post/cf-gym-103957/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,17 @@
title: 2015 ICPC EC-Final (Gym 103957) 训练记录
slug: cf-gym-103957
date: 2023-01-10

tags:
- Binary Search
- DP
- Greedy
- Maths
categories:
- ICPC

description: EC-Final 2022 赛前例行训练
draft: false

image: pixiv-61597814.jpg
lastmod: 2023-01-25
lastmod: 2024-12-27
---

## 正式训练
Expand Down Expand Up @@ -81,7 +78,7 @@ $$

### E. Colorful Floor

实际上手做了之后感觉两三句话说不清楚,因此[新开了一篇文章专门讲这个]({{< ref "/cf-gym-103957e" >}})。
实际上手做了之后感觉两三句话说不清楚,因此[新开了一篇文章专门讲这个]({{< ref "/post/cf-gym-103957e" >}})。

---

Expand Down
6 changes: 3 additions & 3 deletions content/post/home-assistant/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
title: 挂载交换分区并安装 Home Assistant
slug: home-assistant
date: 2024-02-04
lastmod: 2024-02-05
lastmod: 2024-12-27
tags:
- HomeAssistant
- Linux
categories:
- DIY
description: 压榨吃灰树莓派的剩余价值(四)
draft: true
draft: false
---

寒假回到家,突然意识到一个事情:如果我把树莓派单纯用来当 NAS,那两百块钱不到的工控机也可以做这件事,当初完全没必要花四五百买树莓派。
Expand Down Expand Up @@ -96,7 +96,7 @@ sudo swapon /dev/sdb1
### 永久挂载
与之前[讲硬盘挂载的那篇文章]({{< ref "/network-fs" >}})类似,我们还需要在 `/etc/fstab` 里配置一下使得这个新的分区能在每次重启后挂载。`UUID` 参考前述文章获取,挂载点和文件系统都填 `swap`,最后两个参数都填 `0`
与之前[讲硬盘挂载的那篇文章]({{< ref "/post/network-fs" >}})类似,我们还需要在 `/etc/fstab` 里配置一下使得这个新的分区能在每次重启后挂载。`UUID` 参考前述文章获取,挂载点和文件系统都填 `swap`,最后两个参数都填 `0`
## 安装 Home Assistant
Expand Down
4 changes: 2 additions & 2 deletions content/post/network-fs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: 挂载新硬盘并配置网络文件共享
slug: network-fs
date: 2022-11-13
lastmod: 2024-02-04
lastmod: 2024-12-27
tags:
- Network
- NAS
Expand All @@ -15,7 +15,7 @@ draft: false

我手里的树莓派型号是 4B,内存 2G,装了一块 15G 的 SD 卡,外接一个 1T 的 HDD(本文中加装)。系统和上一篇一样仍然是 `Ubuntu Server 22.04.1 LTS`。今后如果没有特殊说明本系列中的设备硬件条件就都是这样了。

不管最终目的是私人影院,家庭监控,还是其他什么别的东西,网络文件共享都是不可绕过的一步。出于不同的设备于使用目的,我一共装了两套工具:Samba 和 DLNA。
不管最终目的是私人影院,家庭监控,还是其他什么别的东西,网络文件共享都是不可绕过的一步。为方便不同设备的连接与使用,我一共装了两套工具:Samba 和 DLNA。

## 挂载硬盘

Expand Down
8 changes: 2 additions & 6 deletions content/post/proxy-conf/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: 校园网 IPv6 免流量上网配置过程
slug: proxy-conf
date: 2022-10-11
lastmod: 2024-02-04
lastmod: 2024-06-21
tags:
- Network
- Linux
Expand Down Expand Up @@ -89,11 +89,7 @@ AttributeError: module 'collections' has no attribute 'MutableMapping'

出于安全考虑,运营商分配的公网地址大概率不是静态的,为了保证长期相对稳定的使用体验还需要配一下 DDNS。

相关教程网上一搜一大堆,我自己用的基于 Cloudflare 的方案,至于脚本早就忘了从哪个教程贴偷的了。贴到这里供有需要的人使用。

{{< highlight-content file="ddns-cloudflare.sh" lang="sh" >}}

使用时候注意修改前几行的信息即可。至于 `zone_name``record_name` 的区别,举个例子,假设你的域名是 `example.com`,然后你打算给你的代理服务器分配 `proxy.example.com`,则 `zone_name``example.com``record_name``proxy.example.com`
相关教程网上一搜一大堆,我自己用的基于 Cloudflare 的方案,具体的用法可以参考[这个 Github 仓库](https://github.com/wherelse/cloudflare-ddns-script)

## 后记

Expand Down
2 changes: 1 addition & 1 deletion themes/stack
Submodule stack updated 42 files
+1 −1 .github/ISSUE_TEMPLATE/bug_report.yml
+1 −0 assets/scss/partials/article.scss
+22 −1 assets/scss/partials/layout/article.scss
+14 −12 assets/scss/partials/menu.scss
+4 −0 assets/ts/colorScheme.ts
+8 −1 assets/ts/search.tsx
+9 −2 config.yaml
+13 −13 data/external.yaml
+2 −2 exampleSite/content/page/about/index.md
+5 −5 exampleSite/content/post/math-typesetting/index.md
+45 −19 exampleSite/hugo.yaml
+1 −1 i18n/ar.yaml
+72 −0 i18n/be.yaml
+73 −0 i18n/bg.yaml
+3 −0 i18n/fr.yaml
+11 −1 i18n/ja.yaml
+72 −0 i18n/oc.yaml
+71 −0 i18n/sk.yaml
+8 −1 i18n/zh-cn.yaml
+38 −0 layouts/404.html
+6 −0 layouts/_default/_markup/render-heading.html
+5 −5 layouts/_default/rss.xml
+1 −1 layouts/partials/article/components/details.html
+1 −1 layouts/partials/article/components/footer.html
+5 −1 layouts/partials/article/components/links.html
+3 −2 layouts/partials/article/components/math.html
+46 −0 layouts/partials/comments/provider/beaudar.html
+1 −1 layouts/partials/comments/provider/disqusjs.html
+2 −1 layouts/partials/comments/provider/giscus.html
+1 −0 layouts/partials/comments/provider/gitalk.html
+1 −1 layouts/partials/comments/provider/twikoo.html
+1 −1 layouts/partials/data/description.html
+2 −2 layouts/partials/footer/components/script.html
+1 −1 layouts/partials/footer/footer.html
+3 −3 layouts/partials/head/head.html
+4 −4 layouts/partials/head/opengraph/provider/base.html
+2 −2 layouts/partials/head/opengraph/provider/twitter.html
+1 −1 layouts/partials/head/style.html
+26 −23 layouts/partials/sidebar/left.html
+4 −1 layouts/partials/sidebar/right.html
+1 −1 netlify.toml
+1 −1 theme.toml

0 comments on commit d3150c6

Please sign in to comment.