Skip to main content
  1. Posts/

Blowfish 迁移记录

·364 words·1 min· loading · loading · ·
Author
Zhenda
A personal website
Hugo Blowfish 指南 - This article is part of a series.
Part : This Article

Blowfish 迁移特性对比
#

特性puppet_zdBlowfish迁移注意
数学公式需配置
代码高亮需配置
Giscus 评论需迁移
社交链接需迁移
侧边栏无此功能
朋友链接⚠️需自定义页面
RSS自动
搜索需启用
深色模式需配置
代码复制enableCodeCopy
阅读时间showReadingTime
目录 TOCshowTableOfContents
分享按钮sharingLinks
作者信息Author 配置
自定义 CSS/JS需迁移

当前关键配置
#

Giscus
#

repo: zhenda-hub/zhenda-hub.github.io
repo_id: R_kgDOKvQVww
category: Announcements
category_id: DIC_kwDOKvQVw84CfdFG
input_position: top
theme: light
lang: en

社交
#

github: zhenda-hub
rss: true

朋友链接
#

- John Doe (https://gohugo.io)
- 梅塔沃克 (https://iweec.com/)

Blowfish 配置文件结构
#

config/_default/
├── hugo.toml       # baseURL, theme, outputs, taxonomies
├── params.toml     # 主题参数
├── languages.en.toml  # 语言、作者信息
└── menus.en.toml   # 导航菜单

必须配置的参数
#

hugo.toml
#

theme = "blowfish"
baseURL = "https://zhenda-hub.github.io/"
outputs.home = ["HTML", "RSS", "JSON"]  # 搜索必需

params.toml
#

enableSearch = true
enableCodeCopy = true
defaultAppearance = "light"
autoSwitchAppearance = true

[homepage]
layout = "profile"
showRecent = true
showRecentItems = 999
cardView = true

languages.en.toml
#

title = "Zhenda's Blog"

[params.author]
name = "Zhenda"
image = "img/avatar.jpg"
headline = "Stay hungry, stay humble, and keep shipping value."
bio = "A personal website"
links = [
  { github = "https://github.com/zhenda-hub" },
  { rss = "/index.xml" },
]

缩略图方案
#

  • 方案 A: Page Bundle - 放 feature* 图片在文章目录
  • 方案 B: 暂时不处理

参考
#

Hugo Blowfish 指南 - This article is part of a series.
Part : This Article