Skip to content

OINK v1.5.0 — Bilingual View

Latest

Choose a tag to compare

@Vonng Vonng released this 04 Nov 15:50
· 3 commits to main since this release

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: true for 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: false is 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/oink@v1.5.0
hugo mod tidy

English release notes · Upgrade guide