Repository navigation
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/oink@v1.6.0
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