Skip to content

Commit cca9edb

Browse files
authored
Merge pull request #9 from pgsty/codex/review-followups
docs: prepare OINK 1.1.0 and align review fixes
2 parents 141d135 + 2c7429b commit cca9edb

68 files changed

Lines changed: 651 additions & 3259 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎Makefile‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
.PHONY: build check dev serve
1+
.PHONY: browser build check dev serve
2+
3+
browser:
4+
HUGO_MODULE_REPLACEMENTS='github.com/pgsty/oink -> $(abspath ../oink)' npm run test:browser
25

36
build:
47
hugo --cleanDestinationDir --minify

‎README.md‎

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,19 +28,20 @@ For theme development, clone both repositories as siblings:
2828
└── oink.pgsty.com/
2929
```
3030

31-
The four Make targets separate published-theme checks from local-theme work:
31+
The five Make targets separate published-theme checks from local-theme work:
3232

3333
```sh
34-
make build # Build production output with the version pinned in go.mod
35-
make check # Test the sibling theme with the non-browser regression suite
36-
make dev # Start the fastest server with the sibling theme
37-
make serve # Preview the pinned theme in the production environment
34+
make build # Build production output with the version pinned in go.mod
35+
make check # Test the sibling theme with the non-browser regression suite
36+
make browser # Run the browser regression suite with the sibling theme
37+
make dev # Start the fastest server with the sibling theme
38+
make serve # Preview the pinned theme in the production environment
3839
```
3940

4041
`build` and `serve` invoke Hugo directly and resolve the published version of
41-
`github.com/pgsty/oink` pinned in `go.mod`. `dev` and `check` set a one-command
42-
module replacement to `../oink`; they do not create a `go.work` file or modify
43-
`go.mod`. `dev` keeps Hugo's fast-render defaults and renders to memory;
42+
`github.com/pgsty/oink` pinned in `go.mod`. `dev`, `check`, and `browser` set a
43+
one-command module replacement to `../oink`; they do not create a `go.work`
44+
file or modify `go.mod`. `dev` keeps Hugo's fast-render defaults and renders to memory;
4445
`serve` uses the production environment, minifies the output, performs full
4546
renders after changes, and does not inject live reload. Node and npm are needed
4647
for the regression tests, not to build the OINK theme or site.

‎TRANSLATION.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@
2020
| 合计 | 127 |
2121

2222
覆盖检查逐一核对首页以及 `docs/`、`blog/`、`book/`、`case/`、
23-
`authors/` 与 `series/`。`content/search.md` 是由主题 i18n 驱动的特殊搜索页面,
24-
不要求独立的 `.zh.md` 同伴。以下命令同时检查文件覆盖率、显式锚点、中英文渲染 ID 和站内链接:
23+
`authors/` 与 `series/`。以下命令同时检查文件覆盖率、显式锚点、中英文渲染 ID
24+
和站内链接:
2525

2626
```bash
2727
make build

‎content/blog/_index.md‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ sidebar_root_link_self: true
99
footer_style: slim
1010
comments: true
1111
blog_index: cards
12+
# The section root is a feed index, not a destination: backlinks belong on
13+
# the posts it lists, so it opts out of the site-wide default.
14+
backlinks: false
1215
# The Book/Blog reading shells keep the title bar pinned: long-form reading
1316
# should not make the navbar appear and disappear under the pointer.
1417
navbar_autohide: false

‎content/blog/_index.zh.md‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ sidebar_root_link_self: true
99
footer_style: slim
1010
comments: true
1111
blog_index: cards
12+
# 栏目根页是一份文章索引而不是落点:反向链接属于它列出的那些文章,所以这一页
13+
# 退出站点级默认。
14+
backlinks: false
1215
# The Book/Blog reading shells keep the title bar pinned: long-form reading
1316
# should not make the navbar appear and disappear under the pointer.
1417
navbar_autohide: false

‎content/blog/release/1.1.0.md‎

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
---
2+
title: OINK 1.1.0 — Native locales and taxonomy directories
3+
linkTitle: OINK v1.1.0
4+
date: 2026-09-03T18:00:00+08:00
5+
lastmod: 2026-09-03T18:00:00+08:00
6+
draft: true
7+
description: >-
8+
OINK 1.1.0 completes the native interface for every Docsy locale, turns
9+
taxonomy roots into navigable directories, and carries the post-1.0
10+
correctness and bounded-checker fixes without requiring a site migration.
11+
authors: [oink]
12+
categories: [release]
13+
tags: [Oink, Release]
14+
series: [oink-releases]
15+
series_weight: 31
16+
release_url: https://github.com/pgsty/oink/releases/tag/v1.1.0
17+
---
18+
19+
> [!IMPORTANT] Release candidate
20+
> The source changes are merged on `main`, but the `v1.1.0` tag, Go Proxy
21+
> module, documentation-site pin, deployment, and live verification are still
22+
> pending. This note remains a draft until those states are complete.
23+
24+
OINK 1.1.0 is the first minor release after the stable 1.0 contract. It adds a
25+
complete native interface for every locale OINK inherits from Docsy and gives
26+
taxonomy roots a real directory surface. It also includes the correctness fixes
27+
prepared after the 1.0 review. No component, configuration, or content migration
28+
is required.
29+
30+
## At a glance {#at-a-glance}
31+
32+
- All 31 Docsy locale catalogs plus generic `zh` now carry the same 194 OINK
33+
messages without generated English fallback. Page counts use Hugo's CLDR
34+
plural selection, including the Arabic, Polish, Romanian, Russian, Serbian,
35+
and Ukrainian forms that cannot be expressed as a simple singular/plural
36+
pair.
37+
- `/tags/`, `/categories/`, `/authors/`, and `/series/` are now directories of
38+
compact term cards instead of a filter-chip row. Taxonomy and term pages share
39+
a localized head, and their right rail starts with a switcher between the
40+
taxonomies declared by the site. Term pages remain row-list archives.
41+
- Cached sidebars preserve page and cascade settings, remain navigable without
42+
JavaScript, and hydrate their active path without a transient contrast drop.
43+
- Dedicated Print output contains no shell navbar, and one per-page coordinator
44+
keeps plain Print and overlapping Book aggregates from racing on Page Store.
45+
- Invalid `book-toc drafts` and Landing `preview.source` inputs now follow the
46+
existing warn-and-fallback or warn-and-omit contract in ordinary previews.
47+
- Redoc static paths behave the same with or without a leading slash under root
48+
and subpath deployments.
49+
- The obsolete ScrollSpy patch no longer ships. Its 1.x configuration key stays
50+
accepted as a quiet compatibility no-op because the normal outline runtime
51+
already tracks the active heading.
52+
- Output checkers build fresh input by default, every checker-owned Hugo process
53+
has a 120-second ceiling, and redundant warning-fatal canaries were removed
54+
without dropping per-case diagnostic and safe-output checks.
55+
56+
## Compatibility {#compatibility}
57+
58+
OINK 1.1.0 keeps the released 1.0 authoring and configuration surface. Existing
59+
sites need no source migration; taxonomy roots change presentation only. The
60+
only retired runtime was unreachable or duplicated existing behavior;
61+
compatibility partials, all three supported search providers, explicit locale
62+
fallbacks, and the migration tools remain in place. Hugo Extended 0.160.1 stays
63+
the floor; on 0.160.x, a non-default generic `zh` alongside `zh-cn` and `zh-tw`
64+
uses `locale: zh-CN`.
65+
66+
## Verification {#verification}
67+
68+
The candidate passed the complete ordered theme suite, the strict synthetic
69+
fixture, 85 migration tests, 41 browser-runtime tests, Book publication checks,
70+
and the real bilingual documentation site. The browser gate covered
71+
accessibility, responsive navigation, keyboard control, content components,
72+
code blocks, Landing, and section theme colors.
73+
74+
The checker trace fell from 735 Hugo starts with 305 warning-fatal builds to 614
75+
and 184 respectively. All 613 checker-owned starts are now bounded; the one
76+
remaining unwrapped build is the CI-owned top-level fixture command.
77+
78+
## Upgrade after publication {#upgrade}
79+
80+
After the public tag and module proxy are verified:
81+
82+
```bash
83+
hugo mod get github.com/pgsty/oink@v1.1.0
84+
hugo mod tidy
85+
hugo --cleanDestinationDir --gc --minify --environment production \
86+
--printPathWarnings --panicOnWarning
87+
```
88+
89+
Pinning the module, passing a local build, deployment, and live rendering remain
90+
separate completion states.

‎content/blog/release/1.1.0.zh.md‎

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
---
2+
title: OINK 1.1.0:原生多语言界面与分类法目录
3+
linkTitle: OINK v1.1.0
4+
date: 2026-09-03T18:00:00+08:00
5+
lastmod: 2026-09-03T18:00:00+08:00
6+
draft: true
7+
description: >-
8+
OINK 1.1.0 补齐全部 Docsy locale 的原生界面,将分类法根页改造成可导航的目录,
9+
并纳入 1.0 之后的正确性修复与有界 checker,现有站点无需迁移。
10+
authors: [oink]
11+
categories: [release]
12+
tags: [Oink, Release]
13+
series: [oink-releases]
14+
series_weight: 31
15+
release_url: https://github.com/pgsty/oink/releases/tag/v1.1.0
16+
---
17+
18+
> [!IMPORTANT] 发布候选
19+
> 源码修改已经合入 `main`,但 `v1.1.0` 标签、Go Proxy 模块、文档站版本固定、
20+
> 部署与线上核验仍未完成。在这些状态闭环前,本说明保持草稿。
21+
22+
OINK 1.1.0 是稳定 1.0 契约之后的第一个次版本:它为 OINK 从 Docsy 继承的全部
23+
locale 补齐原生界面,也让分类法根页拥有真正的目录表面,同时纳入 1.0 评审后准备的
24+
正确性修复。组件、配置与内容均无需迁移。
25+
26+
## 概览 {#at-a-glance}
27+
28+
- Docsy 的 31 份 locale catalog 加上通用 `zh`,现在都拥有相同的 194 条 OINK
29+
消息,不再生成英文回退。页面计数交给 Hugo 按 CLDR 复数类别选择,正确覆盖无法用
30+
简单单复数二分表达的阿拉伯语、波兰语、罗马尼亚语、俄语、塞尔维亚语与乌克兰语。
31+
- `/tags/`、`/categories/`、`/authors/` 与 `/series/` 从筛选芯片行变成紧凑的
32+
术语卡片目录。分类法页与术语页共用本地化页头,右栏先提供站点已声明分类法之间的
33+
切换器;具体术语页继续使用行列表归档。
34+
- 缓存侧栏保留页面与 cascade 设置;没有 JavaScript 时仍可导航,恢复 active 路径时
35+
也不会短暂跌破对比度门槛。
36+
- 专用 Print 输出不再包含外壳 navbar;每页一个 coordinator,避免普通 Print 与
37+
重叠 Book 聚合在 Page Store 上竞态。
38+
- 非法 `book-toc drafts` 与 Landing `preview.source` 输入在普通预览中遵循既有的
39+
「告警并回退」或「告警并省略」契约。
40+
- Redoc 的 static 路径在根路径与子路径部署下,无论开头是否带 `/` 都得到相同结果。
41+
- 不再下发无效 ScrollSpy 补丁。其 1.x 配置键继续作为静默兼容 no-op 接受,因为
42+
普通大纲运行时已经跟踪当前标题。
43+
- 输出 checker 默认构建新鲜输入;checker 启动的每个 Hugo 进程都有 120 秒上限;
44+
重复的 warning-fatal canary 被收缩,但逐例诊断与安全输出检查全部保留。
45+
46+
## 兼容性 {#compatibility}
47+
48+
OINK 1.1.0 保持已经发布的 1.0 创作与配置表面,现有站点不需要迁移源码;分类法根页
49+
只改变呈现。唯一退役的运行时本来不可达或重复既有行为;兼容 partial、三种受支持
50+
搜索后端、显式 locale fallback 与迁移工具均继续保留。Hugo Extended 0.160.1 仍是
51+
下限;在 0.160.x 上同时配置非默认通用 `zh`、`zh-cn` 与 `zh-tw` 时,通用语言需使用
52+
`locale: zh-CN`。
53+
54+
## 验证 {#verification}
55+
56+
候选版本通过完整有序主题套件、严格合成 fixture、85 个迁移测试、41 个浏览器运行时
57+
测试、Book 出版检查,以及真实双语文档站。浏览器门禁覆盖无障碍、响应式导航、键盘
58+
控制、内容组件、代码块、Landing 与分区主题色。
59+
60+
checker trace 从 735 次 Hugo 启动、其中 305 次 warning-fatal,降到 614 与 184。
61+
613 次 checker 自有启动现在全部有界;唯一未包装的是 CI 自己直接执行的顶层 fixture。
62+
63+
## 发布后升级 {#upgrade}
64+
65+
公开标签与模块代理核验通过后执行:
66+
67+
```bash
68+
hugo mod get github.com/pgsty/oink@v1.1.0
69+
hugo mod tidy
70+
hugo --cleanDestinationDir --gc --minify --environment production \
71+
--printPathWarnings --panicOnWarning
72+
```
73+
74+
模块固定、本地构建、部署与线上渲染仍是彼此独立的完成状态。

‎content/docs/_index.md‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ icon: fa-solid fa-book
1919
sidebar_expanded: true
2020
sidebar_root_for: self
2121
sidebar_root_link_self: true
22+
# The section root is a table of contents, not a destination: backlinks
23+
# belong on the pages it leads to, so it opts out of the site-wide default.
24+
backlinks: false
2225
# Docs pins the title bar: a reference tree is read by jumping between pages,
2326
# so the global menu has to stay where the pointer left it.
2427
navbar_autohide: false

‎content/docs/_index.zh.md‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ icon: fa-solid fa-book
1111
sidebar_expanded: true
1212
sidebar_root_for: self
1313
sidebar_root_link_self: true
14+
# 栏目根页是一份目录而不是落点:反向链接属于它指向的那些页面,所以这一页
15+
# 退出站点级默认。
16+
backlinks: false
1417
# 文档区固定顶栏:参考树是靠页面间跳转来读的,全局菜单必须停在指针离开时的位置。
1518
navbar_autohide: false
1619
# 分区身份:文档保持品牌蓝,但显式写出而不是隐式继承 —— 这样侧栏根切换器里

‎content/docs/customize/config.md‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ precedence first:
7171
3. Site `params`.
7272

7373
**Drop the `ui.` prefix when writing it in front matter.** The site's
74-
`params.ui.scroll_spy` is simply `scroll_spy` on a page. A `ui:` block in front
74+
`params.ui.reading_time` is simply `reading_time` on a page. A `ui:` block in front
7575
matter is read by nobody and reported by nobody, so a setting that seems to have
7676
no effect is worth checking against
7777
[Page parameters](/docs/write/frontmatter/) first.
@@ -82,7 +82,7 @@ title: Wide reference
8282
page_width: wide
8383
navbar_enabled: false
8484
footer_style: slim
85-
scroll_spy: true
85+
reading_time: false
8686
---
8787
```
8888

@@ -238,7 +238,7 @@ than from a parameter — see
238238
| `params.ui.sidebar_menu_compact` | boolean | true | Expands only the current branch and its neighbours |
239239
| `params.ui.sidebar_menu_foldable` | boolean | true | Lets the reader expand and collapse sections |
240240
| `params.ui.sidebar_menu_truncate` | integer | 2000 | Maximum entries rendered in one section; the rest are truncated |
241-
| `params.ui.sidebar_cache_limit` | integer | 500 | Above this page count the site reuses shared navigation markup, and the browser restores the active state |
241+
| `params.ui.sidebar_cache_limit` | integer | 500 | At this page count, reuse visible neutral navigation markup for matching language/root/effective settings; the browser adds active state |
242242
| `params.ui.sidebar_width_min` | integer | 220 | Lower bound in pixels for drag-resizing on the desktop |
243243
| `params.ui.sidebar_width_max` | integer | 480 | Upper bound in pixels for drag-resizing |
244244
| `params.ui.sidebar_item_overflow` | enum | ellipsis | `ellipsis` truncates a long title, `wrap` wraps it |
@@ -263,7 +263,7 @@ the tracking behaviour:
263263
| --- | --- | --- | --- |
264264
| `markup.tableOfContents.startLevel` | integer | 2 | Hugo's own: the highest heading level collected |
265265
| `markup.tableOfContents.endLevel` | integer | 3 | Hugo's own: the lowest heading level collected |
266-
| `params.ui.scroll_spy` | boolean | false | Scroll position tracking; `true` highlights the active entry |
266+
| `params.ui.scroll_spy` | boolean | false | Quiet 1.x compatibility no-op; the normal shell runtime always tracks the active outline heading and this key emits no asset |
267267
{.fields meta="type default"}
268268

269269
Hide the outline on one page with the front matter `notoc: true` — see

0 commit comments

Comments
 (0)