↓ 跳过正文
Starmap & Dust

文章 · Posts

星图与尘埃的全部文章:技术实践、Hugo 建站、自媒体与生活成长。

129 篇文章 · 持续更新中

Blowfish 搜索功能

Blowfish 搜索功能

·770 字·2 分钟
Blowfish 搜索功能说明 # Blowfish 主题内置了基于 Fuse.js 的客户端搜索功能。 工作原理 # 1. 索引生成 # Hugo 通过配置生成搜索索引文件 index.json:
Blowfish 迁移记录

Blowfish 迁移记录

·364 字·1 分钟
Blowfish 迁移特性对比 # 特性 puppet_zd Blowfish 迁移注意 数学公式 ✅ ✅ 需配置 代码高亮 ✅ ✅ 需配置 Giscus 评论 ✅ ✅ 需迁移 社交链接 ✅ ✅ 需迁移 侧边栏 ✅ ❌ 无此功能 朋友链接 ✅ ⚠️ 需自定义页面 RSS ✅ ✅ 自动 搜索 ❓ ✅ 需启用 深色模式 ❓ ✅ 需配置 代码复制 ❓ ✅ enableCodeCopy 阅读时间 ❓ ✅ showReadingTime 目录 TOC ❓ ✅ showTableOfContents 分享按钮 ❓ ✅ 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: 暂时不处理 参考 # Getting Started Configuration Homepage Layout
Blowfish 配置指南

Blowfish 配置指南

·635 字·2 分钟
Blowfish 配置选项 # 配置项 当前值 可选值 说明 外观 colorScheme blowfish blowfish, avocado, fire, ocean, forest, neon, etc. 主题配色 defaultAppearance light light, dark 默认外观 autoSwitchAppearance true true, false 自动切换深浅色 导航栏 header.layout fixed basic, fixed, fixed-fill, fixed-fill-blur 导航栏样式 首页 homepage.layout profile profile, page, hero, card, background, custom 首页布局 homepage.showRecentItems 999 数字 显示文章数 homepage.cardView true true, false 卡片视图 文章 article.showHero false true, false 显示 Hero 图片 article.heroStyle - basic, big, background, thumbAndBackground Hero 样式 article.showBreadcrumbs false true, false 面包屑导航 article.sharingLinks - bluesky, email, facebook, linkedin, mastodon, etc. 分享按钮 列表页 list.showHero false true, false 列表 Hero 图片 list.showSummary false true, false 显示摘要 其他 footer.showAppearanceSwitcher false true, false 底部外观切换 smartTOC - true, false 智能 TOC 高亮 当前已启用的功能 # ✅ 搜索 (enableSearch = true) ✅ 代码复制 (enableCodeCopy = true) ✅ 固定导航栏 (header.layout = "fixed") ✅ 文章目录 (article.showTableOfContents = true) ✅ 阅读时间 (article.showReadingTime = true) ✅ 字数统计 (article.showWordCount = true) ✅ 标题锚点 (article.showHeadingAnchors = true) ✅ 分类标签 (article.showTaxonomies = true) ❌ 按年份分组 (list.groupByYear = false) ✅ 卡片视图 (list.cardView = true) ⏸️ Giscus 评论(需要自定义 partial) ⏸️ 文章缩略图(可选) ⏸️ 面包屑导航 待配置功能 # ⏸️ 作者头像(需要添加图片) ⏸️ 分享按钮 ⏸️ Hero 图片 文章创建配置 # 修改 archetypes/default.md 可设置新文章的默认 front matter: +++ title = '{{ replace .File.ContentBaseName "-" " " | title }}' subtitle = "" date = {{ .Date }} draft = false # 默认发布状态 toc = true series = [] +++ 创建新文章时使用: hugo new posts/my-new-article.md 文章摘要配置 # Blowfish 主题根据文章开头格式自动生成摘要: 开头格式 摘要来源 示例 正文 + `
Blowfish 布局说明

Blowfish 布局说明

·206 字·1 分钟
Blowfish 布局配置 # 首页布局 # [homepage] layout = "page" # profile, page, hero, background, card cardView = true showRecentItems = 9 布局 说明 profile 头像+简介+社交链接 page 纯 Markdown 内容 hero 大标题 + Markdown background 背景图 + 内容 card 卡片式文章列表 列表页布局 # [list] cardView = true # 卡片视图(true)或列表视图(false) showSummary = true # 显示摘要 groupByYear = true # 按年份分组 导航栏布局 # [header] layout = "fixed" # basic, fixed, fixed-fill, fixed-fill-blur 布局 说明 basic 普通流动 fixed 固定顶部 fixed-fill 固定+填充色 fixed-fill-blur 固定+毛玻璃 文章 Hero # [article] showHero = true heroStyle = "big" # basic, big, background, thumbAndBackground 切换方法 # 全局配置: 修改 config/_default/params.toml
家庭影院配置:HDR 屏幕与音效选型

家庭影院配置:HDR 屏幕与音效选型

·377 字·1 分钟
配一套能看杜比视界的家庭影院,真正决定观感的只有两件事:屏幕的 HDR 档位,和声音能不能做出环绕。 屏幕:HDR 档位怎么选 # 技术 峰值亮度 黑色 HDR 效果 常见问题 综合体验 HDR400 ~400 nits 一般 很弱 没有分区背光 ⭐ HDR600 ~600 nits 一般 有一点 HDR 分区少 ⭐⭐ MiniLED 1000–1600+ nits 很好 很强 有光晕 ⭐⭐⭐⭐ OLED 800–1300 nits(小区域) 完美黑色 极强 烧屏风险 ⭐⭐⭐⭐⭐ 判断顺序:先看有没有分区背光,再看峰值亮度。HDR400 这种标了 HDR 但没有分区背光的,实际观感和 SDR 差别很小。
Pc Cmd

Pc Cmd

·25 字·1 分钟
省电 # 用核显 更改电源模式 检查电源状态 # upower -e upower -i /org/freedesktop/UPower/devices/battery_BAT0 powercfg/batteryreport