# OINK 1.6.0 — Plain CSS, BM25 local search, and leaner runtimes

> Replace Sass with plain CSS for Hugo 0.170+ compatibility, remove Bootstrap JS and Lunr, introduce scanning BM25 local search with split indexes and field anchors, and upgrade bundled runtimes.

---

LLMS index: [llms.txt](/llms.txt)

---

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 single 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.

> [!IMPORTANT] 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
> [Breaking changes and upgrade](#upgrade) before updating an existing site.

**v1\.6\.0 · 2026-11-23**
- [View release](https://github.com/pgsty/oink/releases/tag/v1.6.0)
- [Source · tar\.gz](https://github.com/pgsty/oink/archive/refs/tags/v1.6.0.tar.gz)
- [Source · zip](https://github.com/pgsty/oink/archive/refs/tags/v1.6.0.zip)
- [pgsty\/oink](https://github.com/pgsty/oink)

## Plain CSS and Hugo 0.170 compatibility {#plain-css}

Hugo 0.170 removed LibSass and the Extended edition. Published OINK 1.5.1 fails
on Hugo 0.170 unless Dart Sass is installed separately. OINK 1.6.0 eliminates
Sass completely: the stylesheet is now 118 plain CSS layer files under
`assets/css/td/`, concatenated by Hugo in cascade order with no compiler and no
generated CSS committed to Git. Production `main.css` output is byte-identical
to the last Sass-compiled stylesheet, and ordinary builds need nothing but the
Hugo binary in any edition (plus Go `1.27.4` for Hugo Modules).

- Stylesheets now publish under `/css/`: `css/main.css`, `css/fontawesome.css`,
  and `css/redoc.css`.
- Site styles live in plain CSS at `assets/css/project.css` followed by
  `assets/css/project/*.css` in path order. The three retired hooks under
  `assets/scss/` (`_variables_project.scss`, `_variables_project_after_bs.scss`,
  and `_styles_project.scss`) are ignored and each emits one build warning via
  `warnidf`.
- Site-owned shells that do not load `main` can request named stylesheets
  (`chrome`, `landing`, `search`, `compare`) through
  `partial "css/bundle.html"`.
- `bin/check-stylesheets.py` verifies layer lists, bans compiler calls, and
  builds probe sites with an empty `PATH`.

## No Bootstrap JS and no Lunr {#leaner-runtime}

OINK 1.6.0 drops `bootstrap.bundle.js`, `@popperjs/core`, `lunr`, and the
unused `katex.min.js`. Core page JavaScript (`js/core.js`) drops from 92 KB to
under 9 KB minified, and `assets/js/third_party/` is removed.

- Version menus in the footer and phone drawer are now CSS-positioned
  disclosures owned by `base.js` (`.td-version-menu__list`, with keyboard
  arrow navigation and Escape handling), and Landing `download` channels switch
  directly in `landing.js` and emit `td:tab-shown`.
- Bootstrap's component CSS remains in `assets/css/td/bootstrap/`, and
  `data-bs-theme` / `data-bs-theme-value` color-mode attributes continue to
  work unchanged. Sites whose custom markup relies on Bootstrap JS widgets or
  `window.lunr` must load their own scripts.

## Scanning BM25 local search {#local-search}

Local search replaces both Lunr and the old substring fallback with one
scanning BM25 engine that builds no index in the browser, eliminating the
first-query stall on large documentation trees while keeping the exact same
configuration keys (`params.offline_search*`).

- **Unspaced CJK and mixed queries.** Contiguous CJK runs match as overlapping
  bigrams without a dictionary (`数据库连接池超时` works without spaces), while
  CJK/Latin boundaries split automatically.
- **Word boundaries, identifiers, and symbols.** Ordinary words match on word
  boundaries (`port` no longer matches `support`), with Porter stemming for
  ASCII words, four-character stems for other alphabets, spelling fallback
  counting transpositions as one edit, and literal matching for identifiers and
  multi-character symbol runs such as `->>`.
- **Automatic split above 2 MiB.** Indexes up to 2 MiB publish unchanged as one
  file. Larger `content` indexes automatically keep navigation metadata in the
  first file and move page bodies to `offline-search-body.<lang>.json`. Results
  from titles, headings, field entries, and keywords appear immediately; body
  text up to 8 MiB loads automatically, while larger text or `Save-Data`
  sessions wait for the reader to choose **Search page text**.
- **Field-level search entries.** Every anchored field (`{.fields}` or
  `fields`/`field`) emits `data-td-search-entry`, and `field` gains an optional
  `id` parameter to preserve legacy anchors such as `guc-work-mem`. Searching a
  parameter name opens its definition directly.

## Upgraded runtimes and on-approach loading {#runtimes}

The vendored runtime inventory (`VENDOR.json`, now 25 top-level dependencies)
refreshes DocSearch `5.2.0`, Mermaid `12.3.0` (preserving `dagre` / `default` /
`classic` defaults), KaTeX `0.19.1` (publishing only the 20 `woff2` faces,
cutting formula asset output from 1.1 MB to 0.3 MB), Swagger UI `5.34.1`,
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` under EPL-2.0).

- **Markmap 1.1.0.** Replaced the legacy 0.18 autoloader, standalone D3,
  highlight.js, and WebFontLoader with scoped `@markmap/*` 1.1.0 ESM modules
  and on-demand local MathJax. Notes handle paragraphs, code blocks, and tables
  with full keyboard access, live theme sync, and source fallback. Options move
  to `foldLevel`, `wrapWidth`, `levelGap`, `siblingGap`, and `colorDepth` (old
  keys warn and are ignored).
- **ReDoc 3.1.0.** Each specification runs in an isolated local HTML reader
  document with its own hash router and telemetry disabled, preventing multiple
  ReDoc instances from colliding with article anchors.
- **On-approach loading.** Asciinema, ECharts, Infographic, Markmap, and Giscus
  now load when a reader approaches them (or immediately for `loading: eager`
  and GitHub sign-in redirects for Giscus), keeping heavy engines off the
  initial critical path and falling back to readable links or source in browser
  print and failure states.

## Shell, localization, and publishing hardening {#shell-i18n}

- **Single-line top navbar overflow.** When horizontal space tightens beside
  the brand, desktop sidebar, and utility controls, icon-bearing top navbar
  items collapse to icon-only mode first (`params.icon: false` or `"none"` opts
  out), and any remaining overflow folds into a trailing `…` disclosure panel
  (`ui_nav_more`) with full icons, labels, and child menus.
- **Faster builds and leaner media.** Off-path sidebar branches render once per
  build below `sidebar_cache_limit` with byte-identical output. Blog featured
  images in `banner`, `hero`, and `wash` modes re-encode as WebP with
  `fetchpriority="high"`, and term-page thumbnails crop and lazy-load.
- **All 32 locales tightened.** Proofread all 32 native catalogs (`i18n/*.yaml`,
  242 keys), fixed cursive RTL `letter-spacing` (`ar`, `fa`), widened the
  Appearance and Page Actions panels cleanly within 200% zoom bounds, and made
  the six Giscus preset stylesheets self-contained.
- **Print, Book, and cache hardening.** Added dedicated Print layouts for home,
  landing, section, and single pages with a shared `print/page-id.html` anchor
  helper; keyed page-scoped `partialCached` calls by base URL and language;
  hardened Book target numbering, TOC escaping, and cross-format `book-*`
  listing determinism; and tightened author input validation and runtime edge
  cases across Duo View, diagrams, and the command palette.

## Breaking changes and upgrade {#upgrade}

Before pinning `v1.6.0`, review the complete checklist in
[Upgrade to 1.6.0](/docs/admin/upgrade/#preparing-1-6):

1. Upgrade Go to **1.27.4+** and Hugo to **0.169.0+** (any edition; validated
   on **Hugo 0.170.1**).
2. Convert any `assets/scss/_*_project*.scss` hooks to plain CSS in
   `assets/css/project.css`, update hardcoded `/scss/*.css` references to
   `/css/*.css`, and switch custom shells to `partial "css/bundle.html"`
   ([Retired SCSS hooks](/docs/admin/upgrade/#sass-hooks)).
3. Remove site dependencies on theme-provided `window.bootstrap`,
   `data-bs-toggle`, or `window.lunr`; switch Landing channel listeners from
   `shown.bs.tab` to `td:tab-shown` and version-menu `.dropdown-menu` selectors
   to `.td-version-menu__list` ([Bootstrap JS](/docs/admin/upgrade/#bootstrap-script),
   [Local search](/docs/admin/upgrade/#search-engine)).
4. Migrate legacy Markmap 0.18 YAML keys
   ([Markmap migration](/docs/components/markmap/#migration)), allow
   `frame-src 'self'` in CSP when using ReDoc 3, and scroll lazy components
   into view in browser tests.

Pin the published module once `v1.6.0` is live:

```sh
hugo mod get github.com/pgsty/oink@v1.6.0
hugo mod tidy
hugo --environment production --minify --printPathWarnings
```

Commit the updated `go.mod` and `go.sum` (including the `go 1.27.4` directive).
Keep build warnings visible and never enable `--panicOnWarning` or
`HUGO_PANICONWARNING`.

---

Backlinks:

- [Releases](/blog/release/)
- [Docs](/docs/)
- [Introduction](/docs/about/)
- [Contributing](/docs/about/contributing/)
- [Upgrade](/docs/admin/upgrade/)
