Skip to content

v1.6.0

Latest

Choose a tag to compare

@Vonng Vonng released this 24 Nov 00:58

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 v1 module path: OINK 1.6.0 stays on github.com/pgsty/oink so 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-identical main.css output. 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, and css/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 at assets/css/project.css and assets/css/project/*.css.
  • Add partial "css/bundle.html" (main, chrome, landing, search, compare) for site-owned shells and bin/check-stylesheets.py for layer verification.

No Bootstrap JS and no Lunr

  • Remove bootstrap.bundle.js, @popperjs/core, lunr, assets/js/third_party/, and the unused katex.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) in base.js and td:tab-shown switching in landing.js. Bootstrap component CSS and data-bs-theme color-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 content indexes larger than 2 MiB into metadata plus offline-search-body.<lang>.json, loading page text automatically up to 8 MiB or on demand above 8 MiB / under Save-Data.
  • Emit data-td-search-entry on anchored fields ({.fields} and fields/field), support optional field id overrides, 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): DocSearch 5.2.0, Mermaid 12.3.0 (preserving dagre/default/classic), KaTeX 0.19.1 (publishing only woff2 faces, cutting formula output from 1.1 MB to 0.3 MB), Swagger UI 5.34.1, ReDoc 3.1.0 (isolated local reader frames with telemetry disabled), Asciinema 3.18.0, Infographic 0.2.20, Pako 3.0.3, idb-keyval 6.3.0, and Viz.js 3.31.0 (Graphviz 16.1.0, EPL-2.0).
  • Upgrade Markmap from 0.18 to scoped @markmap/* 1.1.0 ESM 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: eager and 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: false or "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 blog banner/hero/wash featured images as WebP with fetchpriority="high", and crop/lazy-load term-page thumbnails.
  • Proofread and tighten all 32 native locale catalogs (i18n/*.yaml, 242 keys), fix cursive RTL letter-spacing (ar, fa), make the six Giscus preset stylesheets self-contained, and add dedicated Print layouts (index, landing, section, single) with print/page-id.html.
  • Harden Book target identity via hugo.Context.MarkupScope, cross-format book-* determinism, page-scoped partialCached keys, 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/oink@v1.6.0
hugo mod tidy
hugo --environment production --minify --printPathWarnings

Commit 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