惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

N
Netflix TechBlog - Medium
博客园 - 聂微东
M
MIT News - Artificial intelligence
The Hacker News
The Hacker News
AI
AI
Hacker News: Ask HN
Hacker News: Ask HN
Cloudbric
Cloudbric
GbyAI
GbyAI
B
Blog RSS Feed
S
Secure Thoughts
O
OpenAI News
S
Schneier on Security
Latest news
Latest news
C
Check Point Blog
Know Your Adversary
Know Your Adversary
T
Tenable Blog
J
Java Code Geeks
The Cloudflare Blog
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
WordPress大学
WordPress大学
P
Proofpoint News Feed
雷峰网
雷峰网
Engineering at Meta
Engineering at Meta
C
Cyber Attacks, Cyber Crime and Cyber Security
Cisco Talos Blog
Cisco Talos Blog
H
Hacker News: Front Page
www.infosecurity-magazine.com
www.infosecurity-magazine.com
美团技术团队
博客园 - 司徒正美
Security Latest
Security Latest
Forbes - Security
Forbes - Security
W
WeLiveSecurity
Webroot Blog
Webroot Blog
Last Week in AI
Last Week in AI
L
LINUX DO - 热门话题
Google DeepMind News
Google DeepMind News
Martin Fowler
Martin Fowler
月光博客
月光博客
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
Help Net Security
Help Net Security
H
Help Net Security
Recent Commits to openclaw:main
Recent Commits to openclaw:main
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
U
Unit 42
V2EX - 技术
V2EX - 技术
阮一峰的网络日志
阮一峰的网络日志
SecWiki News
SecWiki News
T
Troy Hunt's Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
T
The Exploit Database - CXSecurity.com

blog@real186526

在 Linux Router 上配置 Source-Based Routing 策略(源进源出) 随笔 Kiss me before I rise 辛德瑞拉。 不断忘记一切的我和接住我的你 —— 「今夜,即使这份爱恋从世上消散」 パレード (Parade 游行)—— 请不要忘记我孤身一人的盛装游行。 白鸟过河滩 Shut Up and Take My Card - 奇特的大陆银行卡外刷小 Tips 若存在终站之后。 雨声残响 八月、某、月明かり(八月、某地、月光皎明)—— My whole life was saved by Rock & Roll. 「花与麦芽糖,最终电车。」 漫谈中国支付系统和银行系统: 一些有意思的事实 Cloudflare Free Argo tunnel 白嫖计划 「 Run short links service with aka 」- 如何部署aka 如何使用 debootstrap 构建一个最小化的Ubuntu Markdown Syntax Guide Math Typesetting
重新开始 - 所以我尝试了一下 Hugo
2023-11-05 · via blog@real186526

在疯狂的摆烂 n 年后,某个人终于想起来他还有个博客。经过好几分钟的思想斗争之后,他决定好好折腾它,以 Linux 为抓手,通过 Hugo 和 nginx 深度共建,对标 Hexo,打通原 Blog 与 Simple 之间的垂直领域屏障,实现多维矩阵闭环,为个人博客赋能(确信)。

Why

Why rebuild it?

相较重建而言,我个人感觉更应该称之为重启。

这个博客建立至今其主人都没好好写过几篇文。

更多意义上来,我更希望能写写一些有意思的东西,所以就重启了。

Why choose Hugo?

我使用 Hexo 驱动博客已经三年之久了,之前写过一个开源的 Hexo 主题(虽然没几个月就 make it Archived 了)。

Hexo 对我而言过于臃肿,每次部署都要抓取不少 NPM Package,并且主题依赖的 node-sass 安装依赖 python2,对于现代的发行版而言 python2 基本已经被弃用,甚至完全被移除。

反观 Hugo,作为 golang 编写的静态网站生成器,standalone 足够简单,并且基本满足我只需要关注于文本本身的要求。

So we start with Hugo

简单的配置 Hugo

我使用了 hugo-theme-stack 作为主题。

1
2
git submodule add https://github.com/CaiJimmy/hugo-theme-stack/ themes/stack
echo "theme = 'stack'" >> ./config/_default/config.toml

然后使用 DisqusJS 作为评论的实现方案。

1
2
3
4
5
6
7
# config/_default/params.toml
[comments.disqusjs]
shortname = "secret"
apiUrl = "https://disqus.skk.moe/disqus/"
apiKey = "secret"
admin = "real186526"
adminLabel = "Admin"

作为 RSS 用户,Hugo 默认内嵌的 RSS 实现根本不够看。我在这里使用了 hugo-atom-feed 来实现了 Atom。

1
2
hugo mod init github.com/186526/blog.186526.xyz
hugo mod get -u github.com/kaushalmodi/hugo-atom-feed
1
2
3
4
5
6
7
8
## ./config/_default/module.toml
[imports]
path = "github.com/kaushalmodi/hugo-atom-feed"

## ./config/_default/outputs.toml
home = ["HTML", "RSS", "ATOM"]
section = ["HTML", "RSS", "ATOM"]
taxonomy = ["HTML", "RSS", "ATOM"]

Atom 文件默认位于 /atom.xml 下。