Skip to content

Commit 2f87799

Browse files
Vonngclaude
andcommitted
feat: adopt OINK 0.6 chrome, add download page, rework taxonomy
Landing and download pages now render inside OINK's landing shell instead of hand-rolling their own <head>, navbar, and footer. Both are `{{ define "main" }}` bodies; the theme supplies chrome, search, and scripts. Removes pig/landing-head, pig/landing-nav, pig/landing-footer, pig/command-palette, landing-search.scss, pig-footer.css, both i18n files, and ~350 lines of dead nav/footer CSS. - Hero: title is now the PostgreSQL / Install / Guide acrostic on the left half, with an inline SVG on the right showing pig's pipeline — upstream repositories, the static binary and its subcommands, and what lands on the host. - New /download/: release matrix with tabs for script, repository, native packages, binaries, and source. Every artifact name and the release date are derived from params.version, so a release bump is the only edit. - Footer is OINK's fat footer from data/footer/<lang>.yaml; the copyright line moves to each language's params.copyright.authors. ICP filings now belong in params.footer_center_info (OINK never read params.footer_icp). - Wordmark is text-only: 0.6 renders the mark beside it, so the emblem baked into pig-word.svg appeared twice. - Taxonomy: authors is a taxonomy with a profile page, release notes carry subsystem tags from one closed vocabulary shared with the docs pages (so /tags/repo/ lists the reference page next to every release that touched it) and no category, and docs keep the localized Diatax categories. - Release notes use the native 0.6 forms: release_url front matter, a ```checksums fence for the asset table, and {{< release-card >}} at the end. - giscus comments on GitHub Discussions in this repository, and the page-end share bar. Google Analytics now also covers the new pages. The landing stylesheets gained a documented "shell seam" block: OINK gives every section inside main a 5rem block padding whose specificity outranks the landing's own rules, so the handful of rules that set section padding carry a .landing-page prefix, and the first section's value travels through --pig-section-pad-top. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Sq2ApUGzvSnkriqwhqWRBw
1 parent 5111f17 commit 2f87799

153 files changed

Lines changed: 1860 additions & 1677 deletions

File tree

Some content is hidden

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

README.md

Lines changed: 91 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# PIG Documentation
22

3-
This repository contains the bilingual website for **PIG***Packager Index
4-
Gateway*, the PostgreSQL extension package manager by
3+
This repository contains the bilingual website for **PIG***PostgreSQL
4+
Install Guide*, the PostgreSQL extension package manager by
55
[Pigsty](https://pigsty.io). It is built with
66
[Hugo](https://gohugo.io/) and the [OINK](https://github.com/pgsty/oink)
77
documentation theme, with English at `/` and Simplified Chinese at `/zh/`.
@@ -20,6 +20,7 @@ pages by front-matter `weight`.
2020
```text
2121
content/
2222
_index.md # landing page metadata (the page itself is layouts/index.html)
23+
download.md # /download/ — the release matrix page (layouts/download/single.html)
2324
docs/_index.md # /docs/ — documentation overview, listed in the sidebar root menu
2425
start.md # /start/ weight 10
2526
intro.md # /intro/ weight 20
@@ -30,6 +31,7 @@ content/
3031
repo.md ext.md build.md sty.md inventory.md pg.md pt.md pb.md pitr.md
3132
blog/ # /blog/ — all posts, newest first
3233
release/ # /release/ and /release/pig-X.Y.Z/
34+
authors/vonng/ # /authors/vonng/ — an author profile (the `authors` taxonomy term)
3335
data/home/metrics.yaml # landing page counters
3436
```
3537

@@ -48,22 +50,100 @@ Each page ships as an English `.md` plus a Chinese `.zh.md`. Two sections
4850
stay out of the docs sidebar tree via `toc_root: true``docs/` and
4951
`blog/` — because the sidebar root menu already lists them.
5052

53+
## Taxonomy
54+
55+
Three taxonomies are declared in `hugo.yaml`: `categories`, `tags`, and OINK
56+
0.6's `authors`.
57+
58+
- **categories** name the kind of page, and they are localized. Only
59+
documentation carries them, using the Diátaxis four — `Tutorial` / `Task` /
60+
`Concept` / `Reference` (`教程` / `任务` / `概念` / `参考`). Release notes
61+
carry no category: the section already says what they are, so a `Release`
62+
term on every post would classify nothing.
63+
- **tags** name the pig subsystem a page is about, from one closed vocabulary
64+
shared by documentation and release notes, in English on both language
65+
trees: `repo`, `ext`, `postgres`, `patroni`, `pgbackrest`, `pitr`, `sty`,
66+
`build`, `inventory`, `catalog`, `cli`, `install`. That shared vocabulary is
67+
the point — `/tags/repo/` lists the `pig repo` reference page next to every
68+
release that touched repository handling. Cap a page at four.
69+
- **authors** is a taxonomy, not a string. A post declares `authors: [Vonng]`;
70+
the profile is the term page at `content/authors/vonng/_index.md`, whose
71+
title is the display name, description the one-line bio, body the long one,
72+
and bundled `featured-avatar.png` the portrait. The pre-0.6 `author:` string
73+
is not used here.
74+
75+
Blog indexes publish as OINK's default row list. `params.ui.blog_index_toggle`
76+
puts a control in the index toolbar so a reader can cycle any of them through
77+
list, cards, and table.
78+
79+
Each release note is written in OINK 0.6's native release forms rather than by
80+
hand:
81+
82+
- `release_url` in front matter is the one release fact. Everything else — the
83+
owner, the project, the tag, the source archive URLs — is parsed out of it,
84+
and the date is the page's own.
85+
- `{{< release-card >}}` closes the post with the tag, the date, and links to
86+
the release, both source archives, and the repository. It sits at the *end*
87+
because blog list rows summarise from `.Plain`, and a card at the top would
88+
become the summary.
89+
- A ```` ```checksums ```` fence turns `sha256sum` / `md5sum` output into the
90+
asset table: one row per file with a download link, OS and architecture
91+
badges, the algorithm (detected from the hex length), a truncated hash with
92+
a copy button, and a copy-all control. The base URL comes from
93+
`release_url`, so the filenames in the fence are the only thing to paste.
94+
Print, Markdown, and RSS output fall back to the plain listing.
95+
96+
## Comments and analytics
97+
98+
Google Analytics 4 (`services.googleAnalytics.id`) and giscus comments
99+
(`params.comments`) are both configured in `hugo.yaml`. Analytics is injected
100+
in production builds only. Comments render at the end of ordinary documentation
101+
and blog pages; the landing page and the download page are standalone
102+
templates with no page-end block, so they carry neither. Discussions live in
103+
the site repository (`pgsty/pig.pgsty.com`), not the product repository, so
104+
that user questions filed against `pgsty/pig` stay separate from page comments.
105+
51106
## Theme boundary
52107

53-
OINK 0.5.1 owns the documentation and blog layouts, navigation shell, search, table
108+
OINK 0.6.0 owns the documentation and blog layouts, navigation shell, search, table
54109
of contents, blocks and shortcodes, styles, scripts, fonts, and third-party
55-
runtimes. The site imports the pinned OINK 0.5.1 release as a Hugo Module.
110+
runtimes. The site imports the pinned OINK 0.6.0 release as a Hugo Module.
56111

57-
The custom landing page keeps its visual design while reusing OINK's
58-
language-local command palette, action manifest, search ranking, and horizontal
59-
`wordmark`. Documentation uses the new search metadata, sidebar icon policy,
60-
content primitives, and assistant page actions; release rows remain text-only
61-
through `default_featured: false`.
112+
The landing page and the download page keep their bespoke visual design, but
113+
they render *inside* the theme shell: OINK supplies `<head>`, the navbar, the
114+
fat footer, the search box and command palette, and the script bundle. Neither
115+
page hand-rolls chrome any more. Documentation uses the new search metadata, sidebar icon policy,
116+
content primitives, and assistant page actions. Release rows stay text-only:
117+
no `images` cascade is set on the blog tree, so nothing resolves a featured
118+
image and `params.ui.featured_image` has nothing to render.
62119

63120
The local layout surface is intentionally small:
64121

65-
- `layouts/index.html` and its `pig/` partials preserve the custom PIG
66-
landing page.
122+
- `layouts/index.html` and `layouts/download/landing.html` are the two bespoke
123+
page bodies. Each is a `{{ define "main" }}` block inside OINK's landing
124+
shell, so the navbar, footer, search, and scripts are the theme's. The only
125+
site partial they carry is `pig/hero-diagram.html`, the home page's inline
126+
SVG. `content/download.md` sets `layout: landing` so the landing base
127+
template applies and the navbar keeps its search box.
128+
- `layouts/_partials/hooks/head-end.html` and `body-end.html` load
129+
`landing-v3.css` / `pig-v3.css` / `download.css` / `fonts.css` and
130+
`landing-v3.js` (plus `download.js`) on the home and download pages only.
131+
Every other page gets the theme bundle and nothing else.
132+
- The landing stylesheets carry a short "shell seam" block. OINK gives every
133+
`section` inside `main` a 5rem block padding (`.td-default main section`,
134+
specificity `0,1,2`), which outranks the landing's own `.hero` /
135+
`.landing-section` rules. The fix is not a blanket reset — that would erase
136+
the landing's rhythm too — but a `.landing-page` prefix on the handful of
137+
rules that set section padding, since two classes outrank one class plus two
138+
elements. The first section is special-cased through the
139+
`--pig-section-pad-top` custom property so its value is still declared once.
140+
- `data/footer/<lang>.yaml` drives OINK's fat footer, and the copyright line
141+
comes from each language's `params.copyright.authors` (rendered as Markdown).
142+
ICP filings, if ever needed, belong in `params.footer_center_info`.
143+
- The home page cascade targets `kind: '{page,section}'` on purpose. Taxonomy
144+
and term pages are descendants of home too, and colouring them `type: docs`
145+
would route them to OINK's `docs/list.html` instead of the term layout that
146+
renders the author profile and the blog rows.
67147
- `layouts/index.md` and `layouts/index.llms.txt` index PIG's intentionally
68148
root-level documents; the generic OINK indexes assume documents live below
69149
`/docs/`.

assets/scss/_styles_project.scss

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,16 @@
3232
opacity: 0.65;
3333
}
3434
}
35+
36+
// 发布注记索引用 table 形态。OINK 的日期列宽 7.5em 是给 ISO 日期算的,
37+
// 本站的 time_format_blog 是 'January 02, 2006' / '2006年01月02日',
38+
// 长日期会顶到标题列上,所以这里只放宽这一列。
39+
.td-blog-table__date {
40+
width: 11em;
41+
}
42+
43+
@media (max-width: 575.98px) {
44+
.td-blog-table__date {
45+
width: 8.5em;
46+
}
47+
}

assets/scss/landing-search.scss

Lines changed: 0 additions & 35 deletions
This file was deleted.

content/_index.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,13 @@ description: "PIG is a PostgreSQL extension package manager: resolve and install
44
weight: 1
55
type: home
66
cascade:
7-
type: docs
7+
# 只把 type: docs 洒到普通页与栏目上。分类法(tags / categories / authors)
8+
# 的列表页与词条页也是 home 的后代,如果一起被染成 docs,就会落到
9+
# OINK 的 docs/list.html,丢掉 term 页自己的标题与博客行样式。
10+
- target:
11+
kind: '{page,section}'
12+
type: docs
13+
body_class: landing-page
814
---
915

1016
PIG is a command-line package manager for PostgreSQL and its extensions. It piggybacks on the

content/_index.zh.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,13 @@ description: "PIG 是 PostgreSQL 扩展包管理器:通过一个自包含 CLI
44
weight: 1
55
type: home
66
cascade:
7-
type: docs
7+
# 只把 type: docs 洒到普通页与栏目上。分类法(tags / categories / authors)
8+
# 的列表页与词条页也是 home 的后代,如果一起被染成 docs,就会落到
9+
# OINK 的 docs/list.html,丢掉 term 页自己的标题与博客行样式。
10+
- target:
11+
kind: '{page,section}'
12+
type: docs
13+
body_class: landing-page
814
---
915

1016
PIG 是 PostgreSQL 与其扩展的命令行包管理器。它依托(PiggyBack)系统原生的 `apt` / `dnf`

content/authors/_index.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
title: "Authors"
3+
description: "People who write here."
4+
toc_hide: true
5+
---

content/authors/_index.zh.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
title: "作者"
3+
description: "在这里写字的人。"
4+
toc_hide: true
5+
---

content/authors/vonng/_index.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
title: "Ruohang Feng"
3+
description: "Author of pig and founder of Pigsty."
4+
# 头像走 OINK 的 featured-image 解析:页面包里名字带 featured 的图片会被选中。
5+
---
6+
7+
Ruohang Feng (Vonng) writes [pig](https://github.com/pgsty/pig) and maintains
8+
[Pigsty](https://pigsty.io/), the PostgreSQL distribution its extension catalog
9+
and repositories come from. He works on PostgreSQL packaging, deployment, and
10+
the tooling that keeps a database fleet operable.

content/authors/vonng/_index.zh.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
title: "冯若航"
3+
description: "pig 的作者,Pigsty 的作者与维护者。"
4+
# 头像走 OINK 的 featured-image 解析:页面包里名字带 featured 的图片会被选中。
5+
---
6+
7+
冯若航(Vonng),[pig](https://github.com/pgsty/pig) 的作者,
8+
[Pigsty](https://pigsty.cc/) 的作者与维护者 —— pig 的扩展目录与软件仓库都出自这里。
9+
主要工作方向是 PostgreSQL 的打包、部署,以及让数据库集群真正可运维的工具链。
311 KB
Loading

0 commit comments

Comments
 (0)