OINK 1.7.0 — Six components, typeset copy, and 29 shortcuts
OINK 1.7.0 brings six new content components (Timeline, Update, Video, Audio,
Social, and Map with vendored Leaflet 1.9.4), typeset rich-text copy
that pastes cleanly into external editors, a unified system of 29 single-key
shortcuts with local browsing history, fold-all, reading-width steps, and a reader
opt-out, plus a typography and palette pass across all four visual presets.
The plain CSS builds on any supported Hugo edition. This release was validated
with Hugo 0.170.1 and Go 1.27.4 for Hugo Modules. See the
toolchain contract.
Six new content components
Each new component keeps a Markdown-native or minimal authoring form and defines
deterministic output across HTML, Print, Markdown/LLMS, and RSS. The theme now
ships 30 shortcodes, 123 plain CSS layers in main, 26 vendored dependencies in
VENDOR.json, and 264 keys in each of the 32 locale catalogs.
- Timeline. A Markdown definition list
followed by
{.timeline}renders a vertical axis with a marker column. CSS only, with no runtime script. - Update. A heading marked
{.update date="2026-11-27" tags="Added, Changed"}stays an ordinary heading for the TOC, anchors, search, and Print, followed by a<time>and tag-chip metadata strip whose tokens stay separated when copied. - Video. Block image syntax targeting a video
file (
) renders a native player supportingcaption,num,poster,track,width,height, andautoplay=true(muted, looped, playing only while visible and never under reduced motion). YouTube, Bilibili, and Vimeo URLs render link cards by default; platforms listed inparams.video_embedsswap in their player on click from validated IDs. - Audio. Block image syntax targeting an audio
file renders a titled native player with
caption,id, and automatic metadata preloading for the first six players. Local audio and video show elapsed playback in the page accent. Their shared media script keeps one audible player active at a time. - Social. The
socialshortcode quotes posts from X (default), Bluesky, Mastodon, Threads, Weibo, Zhihu, Telegram, LinkedIn, ornone(default for nested quotes) entirely from the page, composing Markdown, images, galleries, and nested quotes without platform scripts. The quote makes no platform request; a reader’s browser loads any remote avatar or attachment the author supplies. - Map. A
mapcode fence produces a numbered place list with OpenStreetMap links in HTML, Print and RSS. Markdown and LLMS keep the fence. Configuringparams.mapwithenable: true, an HTTPS tile template ({z},{x},{y}/{-y}, optional{s},{r}) and requiredattributionadds an interactive map through vendored Leaflet1.9.4(BSD-2-Clause), supportingdark_tiles,attribution_url,subdomains,max_zoom(1–22), andloading: clickhost consent.
Typeset copy
Selecting and copying article prose now leaves the page as clean, self-contained rich text drawn from the active preset’s print palette in pixel sizes, without the page canvas color, heading anchor hashes, copy buttons, line numbers, or shell chrome. Editors such as WeChat’s rich-text editor no longer receive grey boxes or dark-mode backgrounds.
- Selecting the whole page copies only the article body; a phrase inside one
line travels as bare inline markup; source line breaks between two CJK
characters no longer paste as spaces; ordered lists preserve partial
start,reversed, andvaluenumbers; and code blocks keep syntax token colors, with a dark code card staying dark. text/plainis unchanged. Setparams.ui.rich_copy: false(or page front matterrich_copy: false) to restore browser-default HTML copying.
Twenty-nine shortcuts, browsing history, and reading width
Single-key navigation is organized into three groups (Navigation,
Actions, and View: 10, 9, and 10 shortcuts). Hovering the bottom-bar ?
button previews the full three-column cheat sheet directly above the footer, and
clicking ? or pressing ' opens it as a centered top-layer dialog—even in Zen
Mode or on footer_style: none pages. Actions unavailable on the current page
stay visible in the grid, dimmed and labeled for screen readers.
- Reader toggle (
Enable shortcuts). Readers can toggle global single-key shortcuts on or off (enabled by default) from Enable shortcuts in the shortcut dialog or the focus stop right after Skip to content. The choice persists per site path across languages (Ctrl/Cmd+Kremains active). - Local browsing history (
H).Hor the Command Palette’s Browsing history command (browse_history) opens a list of up to 100 pages visited on the site, filtered by title and path as you type, and stored strictly in browserlocalStoragescoped by base path. - Fold or unfold all (
O). Expands or collapses sidebar and right-rail groups,<details>callouts and file trees, and collapsible code blocks in one keystroke while keeping the reader’s active path open and scroll position steady. - Reading-width steps (
-/=). Narrows or widens the article column in100 pxsteps between600 pxand the container width, persisting inlocalStorageand restoring before paint; stepping back onto the page’s own width resets the override. - Shortcut changes from 1.6.0. Zen Mode moves from
HtoZ(His browsing history), language cycling moves toX, preset cycling isT, color mode isY, blog index layout isL, version cycling isV, language home isG, command-only palette stays on\(withC), and[and]trigger ChatGPT and Claude.Gno longer opens the focused tree item (EnterandSpaceremain), and the home pageNsection alias is gone (Jremains). Non-text inputs such as gallery radios and range sliders no longer block shortcuts after a click. - Focus and input methods. Closing the palette or history no longer raises
the footer
?hover sheet when focus returns to it, and an Escape that dismisses IME candidates (including Safari’s trailing 229 keydown) stays with the input method.
Refined presets and CJK typography
All four visual presets received a typography and palette pass, with distinct CJK system font stacks and zero bundled CJK font files:
- Paper moves from grey
#f7f6f3to an ivory canvas (#faf9f5), ink#1f1e1c, and a warm clay UI accent (#9b4a28, dark#de8460) while keeping blue underlined links in running text and setting Song headings over Plex Sans and Hiragino Sans GB / system Hei prose. Sites that prefer the previous blue accent can setparams.ui.theme_color: '#2b5f8c'. - Ink sets Inter and Hei headings (weight
700,1 pxh2rule) over system-serif and Song prose at17 px, restricting link underlines to running text, so cards, Book contents, and file trees no longer take them. - Slate retains Inter and Hei with rounded table header corners;
Terminal now sets screen prose in IBM Plex Mono as well (keeping IBM Plex
Sans in print), sets
##/###heading marks light and slightly apart, and colors emphasis. - A table on its own in a tab fills the panel to both edges. Wide tables scroll inside the panel on a phone.
- OINK Kai and prose typography. Emphasis, citations, and blockquotes use
local system Kai through the CJK-only
OINK Kaiface so Han characters are never slanted while Latin keeps real italics. CJK headings sit at zero tracking; prose enablestext-autospace: normalandtext-wrap: pretty, tables use tabular numerals, bare<kbd>tags render as keycaps, and an explicitparams.ui.fonts.uiorfonts.bodyreaches the headings in every preset unlessfonts.headingnames its own face.
Markmap controls, ECharts themes, and publishing fixes
- Markmap corner icons and SVG download. Replaces the boxed “Fit to window” button below Markmap diagrams with subtle, borderless bottom-right icon buttons for Fit to window and Download SVG (exporting a standalone SVG with resolved theme colors and canvas background).
- Site ECharts themes. Define named themes on
window.OinkEchartsThemesso lazy-loaded ECharts fences register and apply them automatically before drawing, guarded inside the chart error boundary. - Styled archived-version banner.
params.archived_versionnow renders a tintedrole="note"banner with an archive icon across all four presets, dark mode, forced colors, RTL, and print, warning once and omitting empty output ifparams.versionis missing. - Vendored library refresh. Updated Mermaid to
12.4.0, Swagger UI to5.36.0, ReDoc to3.2.0, Asciinema Player to3.19.0,@plantuml/coreto1.2026.10, and@markmap/*to1.1.1alongside newly vendored Leaflet1.9.4inVENDOR.json. - Asciinema, Draw.io, accessibility, and card fixes. Asciinema
markersnow reachasciinema-player3.19as[time, label]pairs and skip empty items after a comma; sidebar switcher, pager, and blog gallery links match their visible text in accessible names; Draw.io auto-detection skips video posters, social avatars, and map thumbnails; and.td-blog-card__imagesetsheight: autoso raster thumbnails keep their 16:9 frame.
Upgrading to 1.7.0
OINK 1.7.0 introduces no breaking template or stylesheet changes for sites
already on v1.6.0. Review Upgrade to 1.7.0
for Paper’s clay accent opt-back, updated keyboard bindings, rich_copy
opt-out, and CSP directives for params.map and params.video_embeds.
Pin the published release once v1.7.0 is live:
Commit the updated go.mod and go.sum, keep warnings visible, and never
enable --panicOnWarning or HUGO_PANICONWARNING.
