Repository navigation
Releases
v1.6.0
OINK 1.6.0 removes Sass, Bootstrap's JavaScript bundle, and Lunr so any Hugo edition (0.169.0 or newer, including Hugo 0.170+) builds a site with no external compiler. It replaces local search with a scanning BM25 engine supporting unspaced CJK queries, field-level anchors, and automatic split indexes; upgrades Markmap, ReDoc, Mermaid, KaTeX, DocSearch, and the rest of the bundled runtime set; adds on-approach engine and comment loading, single-line navbar overflow, off-path sidebar caching, and WebP blog covers; and tightens all 32 native locale catalogs.
Deliberate breaking changes on the
v1module path: OINK 1.6.0 stays ongithub.com/pgsty/oinkso existing module paths remain stable, while retiring the three SCSS hooks, moving published CSS paths from/scss/to/css/, and removing Bootstrap JS and Lunr. Review the upgrade guide before updating an existing site.
Plain CSS and Hugo 0.170 compatibility
- Replace Sass with 118 plain CSS layer files under
assets/css/td/, concatenated by Hugo in cascade order with no compiler and byte-identicalmain.cssoutput. Any Hugo edition (0.169.0+) builds a site; Hugo Extended is no longer required. - Publish stylesheets under
/css/:css/main.css,css/fontawesome.css, andcss/redoc.css. - Retire
assets/scss/_variables_project.scss,_variables_project_after_bs.scss, and_styles_project.scss(each warns once per build and is ignored). Place site rules in plain CSS atassets/css/project.cssandassets/css/project/*.css. - Add
partial "css/bundle.html"(main,chrome,landing,search,compare) for site-owned shells andbin/check-stylesheets.pyfor layer verification.
No Bootstrap JS and no Lunr
- Remove
bootstrap.bundle.js,@popperjs/core,lunr,assets/js/third_party/, and the unusedkatex.min.js. Core page JavaScript (js/core.js) drops from 92 KB to under 9 KB minified. - Replace Bootstrap JS version dropdowns and Landing download tabs with CSS-positioned disclosures (
.td-version-menu__list) inbase.jsandtd:tab-shownswitching inlanding.js. Bootstrap component CSS anddata-bs-themecolor-mode attributes remain supported.
Scanning BM25 local search
- Replace Lunr and the legacy substring fallback with a single scanning BM25 engine that builds no index in the browser and keeps existing
params.offline_search*keys unchanged. - Support unspaced CJK queries via overlapping bigrams, CJK/Latin boundary splitting, word-boundary matching with Porter and four-character stems, transposition-aware spelling fallback, literal identifiers, and symbol runs such as
->>. - Automatically split
contentindexes larger than 2 MiB into metadata plusoffline-search-body.<lang>.json, loading page text automatically up to 8 MiB or on demand above 8 MiB / underSave-Data. - Emit
data-td-search-entryon anchored fields ({.fields}andfields/field), support optionalfield idoverrides, and accept quoted/unquoted attributes, custom elements, and entries nested inside headings.
Upgraded runtimes and on-approach loading
- Refresh vendored browser dependencies (
VENDOR.json, 25 top-level entries): DocSearch5.2.0, Mermaid12.3.0(preservingdagre/default/classic), KaTeX0.19.1(publishing onlywoff2faces, cutting formula output from 1.1 MB to 0.3 MB), Swagger UI5.34.1, ReDoc3.1.0(isolated local reader frames with telemetry disabled), Asciinema3.18.0, Infographic0.2.20, Pako3.0.3,idb-keyval6.3.0, and Viz.js3.31.0(Graphviz16.1.0, EPL-2.0). - Upgrade Markmap from
0.18to scoped@markmap/*1.1.0ESM modules with on-demand local MathJax, keyboard-accessible notes, and new YAML keys (foldLevel,wrapWidth,levelGap,siblingGap,colorDepth). - Load Asciinema, ECharts, Infographic, Markmap, and Giscus on approach instead of on initial page load (keeping
loading: eagerand GitHub sign-in redirect support for Giscus).
Shell, localization, and publishing hardening
- Keep top navbar items on a single line at every width with automatic icon-only collapse (
params.icon: falseor"none"opts out) and a trailing…overflow panel (ui_nav_more). - Cache off-path sidebar branches once per build below
sidebar_cache_limit, re-encode blogbanner/hero/washfeatured images as WebP withfetchpriority="high", and crop/lazy-load term-page thumbnails. - Proofread and tighten all 32 native locale catalogs (
i18n/*.yaml, 242 keys), fix cursive RTLletter-spacing(ar,fa), make the six Giscus preset stylesheets self-contained, and add dedicated Print layouts (index,landing,section,single) withprint/page-id.html. - Harden Book target identity via
hugo.Context.MarkupScope, cross-formatbook-*determinism, page-scopedpartialCachedkeys, collapsed-sidebar edge hover during animation, and Duo View first-scroll handling during layout.
Upgrade
Use Hugo 0.169.0 or newer (any edition; validated on 0.170.1) and Go 1.27.4+. No Sass compiler or Node.js installation is required.
hugo mod get github.com/pgsty/[email protected]
hugo mod tidy
hugo --environment production --minify --printPathWarningsCommit go.mod and go.sum (including go 1.27.4). Do not enable --panicOnWarning or HUGO_PANICONWARNING. See Upgrade to 1.6.0 for migrating SCSS hooks, Bootstrap JS/Lunr callers, Markmap options, and ReDoc CSP rules.
Validation
Validated with Hugo 0.170.1 (standard edition), Go 1.27.4, Python 3.14.8, and Node 26.13.0: all 102 JS runtime unit tests, 36 theme checkers, 120 Python unit tests, module-mode and typography probes, and GitHub CI for the v1.6.0 tag (including Book EPUB/PDF publication) passed. On oink.pgsty.com, the published v1.6.0 pin gate, zero-deprecation production build, 1,086-file output security check, Site checks (including afdocs), and all 15 Browser quality Playwright/axe suites passed.
English release notes · Chinese release notes · Full changelog
OINK v1.5.1
OINK 1.5.1 is a maintenance release for the bilingual reader introduced in 1.5.0. It stabilizes Duo View, corrects RSS and Print output, and fixes navigation, search, validation, accessibility, and localization. Existing params.ui.compare settings and the compare_translations action remain compatible; no content migration is required.
Duo View
- Use the Duo View name consistently across all 32 interface languages, the page entry, Command Palette, keyboard help, and status messages. With keyboard navigation enabled,
Btoggles the reader from the page or either pane. - Ignore the iframe's initial blank load, report a document that remains blank after 15 seconds, and provide Retry and a direct link. A pane becomes ready when its article is parsed, so slow images do not discard readable content.
- Present Sync Scroll as a labelled switch. Explain partial heading matches and overall-progress synchronization separately, showing the note only when headings actually differ.
- Keep the follower pane synchronized during continuous scrolling, reveal hidden tabs for fragment links, and remeasure after tab changes.
- Preserve the target language, Sync setting, visible pane, and reading positions across reopen, reload, and history restoration. Improve Escape handling, keyboard scrolling, menu state, and focus restoration.
- Exclude later blog archive pages and translations that do not publish HTML from comparison targets.
Publishing, navigation, and accessibility
- Keep RSS summaries in RSS format state; sort before limiting entries, omit undated publication dates, and render static component HTML.
- Restrict blog archive pagination and
prev/nextlinks to HTML so Print produces one complete aggregate. - Namespace nested component IDs and references together, keeping copy and chart controls attached to their own content.
- Keep navigation JSON IDs and section indexes stable across language and deployment prefixes; avoid duplicated prefixes in version links.
- Restore mobile utilities on navbar-only pages, retain populated taxonomy controls, and fix empty TOC controls, duplicate Book numbering, closed-drawer shadows, and list-style leakage.
- Improve keyboard focus and Escape behavior, localize blog pagination and breadcrumbs, and preserve print links, forced-colors navigation, and RTL typography. Apply the shared URL policy to Landing links and hide repeated marquee rows from assistive technology.
Authoring and search
- Warn and use safe fallbacks for positional shortcode arguments, invalid Book numbers, missing manual-link references, and malformed Landing records.
- Rank repeated search terms above passing mentions within the same field tier, including literal identifiers such as
top_k(#60). - Read page descriptions through
.Descriptioninstead of the deprecated.Params.descriptionpath.
Upgrade
Use Hugo Extended 0.168.0 and Go 1.27.3. Hugo's built-in LibSass remains the supported compiler; no external Sass installation is required.
hugo mod get github.com/pgsty/[email protected]
hugo mod tidy
hugo --environment production --minify --printPathWarningsCommit go.mod and go.sum. Keep the upstream LibSass deprecation warning visible; do not enable --panicOnWarning or HUGO_PANICONWARNING. See the upgrade guide for vendored themes and submodules.
Validation
Validated with Hugo Extended 0.168.0 and Go 1.27.3: 49 theme checks, 67 documentation checks, and 519 browser checks passed, including multilingual Duo View coverage and reproduced RSS, Print, and stalled-pane regressions. GitHub CI passed for the release tag, and the documentation site's published-pin and browser suites passed.
English release notes · Chinese release notes · Full changelog
OINK v1.5.0 — Bilingual View
OINK 1.5.0 adds Bilingual View: read a page beside an existing translation, with optional scroll sync based on shared heading IDs.
- Opt-in: set
params.ui.compare: truefor translated Docs, Book, and blog pages. Open it from page actions, the Command Palette, or B when keyboard navigation is enabled. It loads existing HTML pages on demand; no translation service or language-pair build is required. - Responsive and accessible: below 900 CSS pixels, two compact control rows leave one pane visible at a time. RTL hosts place the current page on the right; forced-colors mode identifies the selected pane with a border. Crossing the breakpoint preserves language-menu focus and the selected pane.
- Reliable navigation: refreshing or restoring the reader reuses its history entry. Back closes it once, Forward reopens it, and a pending automatic restore does not override an explicit close or queued reopen.
- Language control: a language with
params.ui.compare: falseis excluded both as a host and as a target. All 32 interface catalogs include the new labels. - Compatibility: the feature is off by default. Print, Markdown, RSS, and sites that leave it disabled retain their existing behavior. Existing content needs no migration.
When enabling it, allow same-origin frames in CSP and embedding headers. Guard custom analytics in hooks/head-end.html with window.OinkComparePane. Theme-managed analytics skips panes automatically; with comparison enabled, a site override of Hugo's google_analytics.html is not used.
Use Hugo Extended 0.168.0 and Go 1.27.3. Hugo's built-in LibSass remains the compiler; keep its accepted deprecation warning visible.
hugo mod get github.com/pgsty/[email protected]
hugo mod tidyOINK v1.4.0
OINK 1.4.0 makes technical content easier to read and navigate.
- Tables: opt in with
.expandfor a corner action and a roomy reader. Use.wideindependently or combine{.wide .expand}. Captions now align with column labels and leave room for the action. - Diagrams: Mermaid and local PlantUML share zoom, pan, fit, source copy and SVG export. Engines load near the viewport. PlantUML can use bundled browser assets without a rendering server.
- Search: mixed Chinese/English queries, technical identifiers, relevant section anchors, explicit partial matches and a current-section filter.
- Blog: a fourth
galleryview with wall, seamless and masonry layouts, independent preferences, keyboard access and touch captions. - Components: consistent spacing and feedback, divided card lists, compact steps and one-line command strips. Paper headings lose decorative tails; Ink and Terminal remain opt-in experiments.
- Repairs: nested-tab fragment links, narrow-column equations and controls, diagram resizing/printing, Markmap fit, Infographic surfaces and dialog clipboard fallback.
Use Hugo Extended 0.168.0 and Go 1.27.3. Builds continue to use Hugo's built-in LibSass; no external Sass compiler is required. Keep the upstream deprecation warning visible. Enabled PlantUML with no endpoint now selects local rendering; set params.plantuml: false to disable it.
hugo mod get github.com/pgsty/[email protected]
hugo mod tidyOINK v1.3.2
OINK 1.3.2 restores builds with Hugo Extended's built-in Sass compiler. Ordinary users no longer need to install Dart Sass.
- Restore Hugo Extended 0.166.0 as the minimum and pinned default for development and strict CI.
- Compile main and ReDoc styles with built-in LibSass; preserve project SCSS hooks and dark code highlighting.
- Allow ordinary Hugo 0.168.0 builds to show the upstream LibSass deprecation warning. Use 0.166.0 for
--panicOnWarningchecks. - Keep the independent readability and FileTree fixes from 1.3.1.
Both Hugo versions are tested with no Sass executable on PATH; the 0.168.0 compatibility check accepts only its known upstream warning.
Upgrade with hugo mod get github.com/pgsty/[email protected] and commit go.mod / go.sum. Remove Dart Sass installation steps from your site's build configuration. Refresh vendored themes or classic theme copies when applicable.
OINK 1.3.2 恢复使用 Hugo Extended 内置的 Sass 编译器,普通用户无需安装 Dart Sass。
- Hugo Extended 0.166.0 恢复为最低版本,并固定为开发与严格 CI 的默认版本。
- 主样式与 ReDoc 样式使用内置 LibSass,保留项目 SCSS 钩子与深色代码高亮。
- Hugo 0.168.0 普通构建可以保留上游 LibSass 弃用警告;使用
--panicOnWarning时请选择 0.166.0。 - 保留 1.3.1 中独立的可读性与 FileTree 修复。
两个 Hugo 版本均通过了 PATH 中没有 Sass 可执行程序的构建检查;0.168.0 兼容检查只接受已知上游警告。
运行 hugo mod get github.com/pgsty/[email protected] 升级,并提交 go.mod / go.sum。删除站点构建配置中的 Dart Sass 安装步骤;使用 vendor 或传统主题副本的站点需要同步更新主题文件。
OINK v1.3.1
Readability repairs and an opt-in FileTree comment layout, with a refreshed
Hugo and Sass toolchain.
Changed
- Advance the minimum to Hugo Extended 0.168.0. Validate this release with
Go 1.27.2 and Hugo Extended 0.168.0; CI follows the latest stable Go and Hugo
releases and records the versions used. The module's Go minimum remains 1.27.0. - Refresh homepage and RSS output goldens for Hugo's generator-tag placement
and automatic summaries that extend to preserve balanced HTML containers. - Compile main and ReDoc styles with standalone Dart Sass 1.105.2, preserving
project-variable hooks and the separate Font Awesome stylesheet. Install
Dart Sass onPATHbefore building. The four known Bootstrap/import-scope
language deprecations are scoped out; other warnings remain publication-fatal. - Load the dark Chroma palette with Sass modules and correct the adjacent
download-channel selector for Dart Sass.
Fixed
-
Keep Markmap node text readable across light/dark modes and visual presets,
while retaining dark text for print. -
Keep the fixed right rail above the footer, including pages without a
sidebar and content reflows from tabs, blog view changes, and loaded media. -
Add
.td-table--widefor technical tables that need intact identifiers and
bounded descriptions inside a horizontal scroll region. Ordinary tables,
field lists, and static outputs retain their existing layout. -
Add
wrap=trueto FileTree fences for complete long comments, including
unbroken identifiers. The defaultwrap=falsepreserves compact rows;
filenames, folding, divider controls, mobile stacking, and Print behavior
retain their existing contracts. Invalid values warn and fall back to false.
Contributors
Thanks to @imbajin for reporting and contributing
these readability repairs, together with fixtures, tests, and bilingual docs:
- #48: Markmap text colors across appearances.
- #50: fixed TOC clearance above the footer.
- #52: complete FileTree comments, integrated
behind the optionalwrapparameter. - #54: readable technical table widths,
integrated through the explicit.td-table--widemodifier. - Documentation #11: companion
design contracts and regression coverage.
OINK v1.3.0
OINK 1.3.0 adds Expo image albums and improves real-world site rendering across navigation, Landing pages, and Print output.
Highlights
- Expo albums with wall, masonry, and seamless layouts; original-image viewing, keyboard controls, touch gestures, and remembered reader preferences.
- Stable Docs and Book navigation across custom homepages, explicit trees, mobile drawers, and shared page actions.
- Complete aggregate Print output, including release sections, Markdown shortcode headings, encoded anchors, relative links, and custom local IDs.
- Scoped Landing component IDs, working RSS feeds, accessible code blocks, and consistent content styles.
- Consumer upgrade tooling that covers Hugo Modules and reports classic themes, validates exact published pins, and checks the four-style reader menu.
Toolchain and upgrade
Hugo Extended 0.166.0 is the minimum and sole development/CI baseline. The module declares Go 1.27.0. Ordinary sites need no Node.js or optional OINK CLI.
hugo mod get github.com/pgsty/[email protected]Classic theme consumers should update their themes/oink submodule or source copy to this tag. Retain params.ui.preset: paper and the explicit preset_menu: [paper, slate, ink, terminal] policy for maintained sites.
中文
OINK 1.3.0 新增 Expo 图片相册,并修复真实站点中发现的导航、Landing、RSS 与打印输出问题。聚合打印现在完整包含发布正文、短代码内标题与章节锚点,正确处理编码片段和相对链接。升级工具补齐传统主题目录盘点、正式版本校验及四种样式菜单检查。
最低版本及统一开发、CI 基线为 Hugo Extended 0.166.0;模块声明 Go 1.27.0。普通站点不需要 Node.js 或可选的 OINK CLI。
OINK v1.2.0
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/[email protected]
hugo mod tidy
hugo --cleanDestinationDir --gc --minify --environment production \
--printPathWarnings --panicOnWarningOINK v1.1.0
OINK 1.1.0 completes the native multilingual interface, improves navigation and keyboard behavior, and adds optional APIs for site-owned sidebar state and search actions. Existing 1.0 content and configuration need no source migration.
OINK 1.1.0 补齐原生多语言界面,完善导航与键盘操作,并提供可选的侧栏状态和搜索动作扩展 API。现有 1.0 内容与配置无需迁移。
Features / 新增能力
- 32 native locale catalogs, each with 194 OINK messages and locale-aware plurals; no generated English fallback blocks.
- Taxonomy directories for tags, categories, authors, and series, with compact term cards, localized headings, and a taxonomy switcher.
OinkSidebarexposes readiness, committed disclosure state, and events for site-owned persistence (#41).OinkCommandPalette.registerSearchTailadds query-aware site actions, with cancellation, one pending action at a time, and explicit focus handoff (#40).- Non-link content groups retain child navigation and Print/Book contents; combine
sidebar_divider: truewithbuild.render: neverto omit a group's own page (#42).
Fixes / 问题修复
- Root-menu exclusions now apply to self-root sections (#43); the current linkable root remains a location marker.
- Hidden sidebars and right-hand outlines leave the focus order. Mobile drawer trapping, responsive relocation, group keyboard navigation, and initialization order now preserve usable focus.
- Pointer clicks no longer produce a large reading-container outline after an unrelated key; keyboard focus remains visible (#44).
- Copying an article no longer inserts hidden image-preview instructions into plain text or rich HTML. Image descriptions, captions, zoom, and keyboard controls remain intact.
- Cached sidebars preserve effective page settings and work without JavaScript. Print output omits shell chrome, and overlapping Book aggregates no longer race.
- Invalid Book/Landing inputs retain their documented fallback behavior; Redoc local paths resolve consistently beneath root and subpath deployments.
Compatibility and upgrade / 兼容与升级
Hugo Extended 0.160.1+; continuous checks use 0.165.0. The Go module directive remains 1.27.0. On Hugo 0.160.x, a non-default generic zh language alongside regional Chinese catalogs needs locale: zh-CN.
No 1.0 source migration is required. Review site-level overrides for taxonomy, sidebar, Print, and image zoom. Image zoom and local search remain off by default; no remote search provider or query telemetry is added. scroll_spy remains an accepted no-op throughout 1.x.
hugo mod get github.com/pgsty/[email protected]
hugo mod tidy
hugo --cleanDestinationDir --gc --minify --environment production \
--printPathWarnings --panicOnWarningCommit go.mod and go.sum, then check representative language, mobile, light/dark, Print, and subpath routes. Theme publication does not automatically upgrade deployed sites.
Full changelog: v1.0.0...v1.1.0
OINK v1.0.0
OINK 1.0.0 promotes the current component, configuration, content, output, and maintainer contracts to the first stable major release. This release rolls up every theme change after v0.8.0; existing 0.8.x sites need no content or configuration migration.
Highlights:
- Single-page Print now preserves the same heading and footnote IDs as ordinary HTML, while section and whole-Book aggregates keep collision-safe namespaces.
- Book sidebar numbers remain atomic beside long, wrapping titles.
- The release toolchain follows the current Hugo Themes updater on Go 1.27 and Hugo Extended 0.165.0; the declared Hugo compatibility floor remains Extended 0.160.1.
- OINK Starter is the supported first route for new sites, with neutral Docs, Blog, and Book content plus strict GitHub Pages and Cloudflare Pages workflows.
- The README, theme metadata, production case links, and optimized 3:2 Hugo Themes gallery images now present the complete framework consistently.
Upgrade:
hugo mod get github.com/pgsty/[email protected]
hugo mod tidy
hugo --cleanDestinationDir --gc --minify --environment production \
--printPathWarnings --panicOnWarningFull bilingual release notes: https://oink.pgsty.com/blog/release/1.0.0/
Complete source comparison: v0.8.0...v1.0.0