Repository navigation
OINK 1.2.0 brings four visual styles, independent style and light/dark controls, and more reliable reading, navigation and publishing. Fonts, icons and core browser runtimes remain bundled with the theme and served locally.
OINK 1.2.0 带来四套视觉风格、独立的风格与明暗切换,并改善阅读、导航和出版体验。字体、图标与核心浏览器运行时继续随主题分发,由站点本地提供。
Four styles / 四套风格
- Paper is the new default: warm surfaces, IBM Plex Sans, fine heading rules and framed tables. Paper 成为默认风格,使用暖色纸面、本地 IBM Plex Sans、标题细线和外框表格。
- Slate preserves OINK's original technical look. Set
params.ui.preset: slateto retain it when upgrading. Slate 保留原有技术风格,升级时设置params.ui.preset: slate即可沿用。 - Ink adds black, white and red with strong rules and square cards. Terminal pairs monospace headings and controls with readable sans-serif prose, teal links and amber accents. Both are explicit opt-ins. Ink 采用黑白红、粗线与方形卡片;Terminal 使用等宽标题与控件、无衬线正文、青绿链接和琥珀强调;两者均可显式启用。
- Appearance uses compact two-column style buttons and a separate Light group. The sun and moon show the current state. Keyboard controls, mobile dialogs, saved preferences and reading-position preservation are included. 外观菜单 使用两列风格按钮与独立明暗控件,太阳/月亮表示当前状态,支持键盘、移动端、偏好持久化与阅读位置保持。
params:
ui:
preset: paper
preset_menu: [paper, slate, ink, terminal]
dark_mode: trueThe reader menu is off by default. preset_menu: true offers Paper, Slate and the site's default preset. No external font or CDN-script dependency is added. Optional comments and analytics retain their existing service boundaries.
读者风格菜单默认关闭;preset_menu: true 提供 Paper、Slate 和站点默认预设。本次没有新增外部字体或 CDN 脚本依赖;可选评论和统计服务保留原有边界。
Other changes / 其他变化
- Clearer CJK keyword-only search summaries and reliable outline links containing literal percent signs. 改善中文关键词搜索摘要与包含字面百分号的大纲链接。
- Consistent sidebar, pager and navigation JSON; correct blog pagination canonicals and actual-translation SEO alternates. 统一侧栏、翻页与导航数据,修正博客分页及多语言 SEO。
- Safer repository links for Windows and external mounts, plus fixes for clipboard focus, dialogs, no-JavaScript landing pages, image metadata, math and diagrams. 修复仓库路径、复制焦点、弹窗、无脚本首页、图片元数据、数学与图表行为。
- Stronger PDF resource isolation, snapshot destination protection, nested-code migration and a guarded consumer-upgrade tool. 加强 PDF 资源隔离、快照保护与嵌套代码迁移,并提供可核验的消费站升级工具。
Compatibility and upgrade / 兼容与升级
Hugo Extended 0.160.1+; CI uses 0.165.0. The module declares Go 1.27.0. On Hugo 0.160.x, a non-default generic zh alongside regional Chinese catalogs needs locale: zh-CN.
Paper changes the default appearance. Select Slate before upgrading if you want to preserve the previous look. Existing 1.1 content needs no bulk migration. Review site-level overrides and verify representative EN/ZH, mobile, light/dark and Print pages.
Paper 会改变默认外观。 需要保留旧版样式时,先选择 Slate。现有 1.1 内容无需批量迁移;升级后检查站点覆盖,以及中英文、移动端、浅深色和打印页面。
hugo mod get github.com/pgsty/oink@v1.2.0
hugo mod tidy
hugo --cleanDestinationDir --gc --minify --environment production \
--printPathWarnings --panicOnWarning