Skip to content

Commit 1ff414a

Browse files
committed
Fix dead nav links and add migrations index page
The VitePress nav menu had been carrying four dead targets and two semantically wrong ones since the sidebar was populated. The `Guide` entry (and its Chinese mirror `指南`) pointed at the site root `/`, which renders the home page's hero+features layout rather than a guide. The `Migrations` and `Changelog` entries (and their Chinese mirrors) pointed at `/migrations/` and `/changelog`, which both returned HTTP 404 — neither path had an underlying page. The nav was the only place the four 404 URLs lived; nothing else linked at them, which is why the strict dead-link checker and the prior site-wide verification swept past them. They surfaced through a manual menu-by-menu inspection of the deployed nav. The `Guide` entry now points at `/guides/getting-started`, matching the first entry in the Guides sidebar group. The home-page hero "Get started" CTA continues to point at `/quickstart` separately, so the 60-second and 15-minute entry paths stay distinct (hero = quickstart; nav menu = guides region entry). The Chinese mirror is updated symmetrically to `/zh/guides/getting-started`. The `Migrations` entry retains its `/migrations/` target but the URL now resolves through a new overview page, `docs/migrations/index.md`. The page lists the six per-release migration guides (v0.1→v1.0 through v1.4→v1.5) with one-line descriptions of what each covers, a recommended reading order for multi-version upgrades, an explanation of why this section is English-only, and cross-links to the CHANGELOG, Getting started, and API reference. It carries the `EN_ONLY_PREFIXES` hreflang-skip classification from the prior commit (zh-CN hreflang omitted on this and the six migration files alike), so search engines see a single English-only section. The Chinese `迁移指南` entry now cross-links to the same `/migrations/` overview because migration guides are English-only by policy — there is no `/zh/migrations/` namespace. The Chinese sidebar already cross-links the per-release migration pages to their English URLs the same way; the nav entry just makes that explicit at the top-level navigation surface. The `Changelog` entry (and its Chinese mirror) now points at the canonical CHANGELOG file on GitHub at `https://github.com/zhh2001/jp4/blob/main/CHANGELOG.md`. The absolute-URL approach matches the same pattern already used inside the migration guides for their CHANGELOG cross-references — the CHANGELOG is a single canonical source and GitHub renders it correctly, with no maintenance burden from mirroring it as a VitePress page that would have to track every release. Post-fix verification: VitePress builds in 6.5 seconds with zero dead-link warnings; the sitemap grows from 62 to 63 entries (the new migrations index lands as a sitemap URL); the live nav menu now resolves all eight of its links (four EN + four CN); doc-lint reports zero failures with the same 19 file-level skips as before; the new index page carries unique title/description/keywords frontmatter and renders through the per-page keywords meta the prior commit wired up. No Java source or test touched; the Maven build, test suite, and published artefact surface are unchanged. SemVer-irrelevant.
1 parent 45f3c82 commit 1ff414a

2 files changed

Lines changed: 43 additions & 5 deletions

File tree

docs/.vitepress/config.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -176,10 +176,10 @@ export default defineConfig({
176176
description: DESCRIPTION_EN,
177177
themeConfig: {
178178
nav: [
179-
{ text: 'Guide', link: '/' },
179+
{ text: 'Guide', link: '/guides/getting-started' },
180180
{ text: 'API reference', link: '/api/' },
181181
{ text: 'Migrations', link: '/migrations/' },
182-
{ text: 'Changelog', link: '/changelog' },
182+
{ text: 'Changelog', link: 'https://github.com/zhh2001/jp4/blob/main/CHANGELOG.md' },
183183
],
184184
sidebar: [
185185
{
@@ -283,10 +283,10 @@ export default defineConfig({
283283
description: DESCRIPTION_ZH,
284284
themeConfig: {
285285
nav: [
286-
{ text: '指南', link: '/zh/' },
286+
{ text: '指南', link: '/zh/guides/getting-started' },
287287
{ text: 'API 参考', link: '/zh/api/' },
288-
{ text: '迁移指南', link: '/zh/migrations/' },
289-
{ text: '更新日志', link: '/zh/changelog' },
288+
{ text: '迁移指南', link: '/migrations/' },
289+
{ text: '更新日志', link: 'https://github.com/zhh2001/jp4/blob/main/CHANGELOG.md' },
290290
],
291291
sidebar: [
292292
{

docs/migrations/index.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
---
2+
title: Migration guides
3+
description: Per-release migration guides for jp4 — v0.1 → v1.0 through v1.4 → v1.5. Each guide documents the API surface changes between two adjacent versions, with before/after code snippets for callers updating across the boundary and the v1.x roadmap snapshot captured at that release.
4+
keywords: [jp4, migration, version upgrade, v0.1, v1.0, v1.1, v1.2, v1.3, v1.4, v1.5, release notes]
5+
---
6+
7+
# Migration guides
8+
9+
Per-release migration guides for upgrading a jp4 controller across one or more minor-version boundaries. Each guide documents the API surface changes between two adjacent versions: which methods were added, which behaviour tightened, what (if anything) requires a code change at the call site, and the v1.x roadmap snapshot captured at that release.
10+
11+
The guides are written from the *callers* perspective — what does a controller already running on version X need to change to upgrade to version Y? The answer is "nothing" for every v1.0 → v1.5 transition because the project's SemVer commitment is binding: minor versions add capabilities without removing or breaking the existing surface. Each guide cites the commit hash where each change landed; `git show <hash>` resolves the full diff.
12+
13+
## All guides
14+
15+
| Guide | Released | What it covers |
16+
|---|---|---|
17+
| [v0.1 → v1.0](/migrations/migration-0.1-to-1.0) | 2026-05-08 | Additions (paramInt / paramLong / metadataLong / symmetric fromBytes factories), behaviour tightening (MastershipStatus.toString format, UncheckedIOException for fromFile, null-rejection on accessors, actionable width-overflow messages), documentation polish (thread-safety contracts, null contract, production readiness). The v1.0 cut. |
18+
| [v1.0 → v1.1](/migrations/migration-1.0-to-1.1) | 2026-05-09 | ReadQuery.where for client-side filtering, Connector.preserveRoleOnReconnect for primary-mandatory HA, Mac.ZERO constant. |
19+
| [v1.1 → v1.2](/migrations/migration-1.1-to-1.2) | 2026-05-11 | Packet-ingestion control surface — DropEvent record + Reason enum, P4Switch.onPacketDropped listener, Connector.packetInFilter pre-fan-out filter. |
20+
| [v1.2 → v1.3](/migrations/migration-1.2-to-1.3) | 2026-05-14 | Stream-message dispatch family completes — DigestEvent + P4Switch.onDigest + DigestConfig + P4Switch.enableDigest + IdleTimeoutEvent + P4Switch.onIdleTimeout + TableEntry.idleTimeoutNs. |
21+
| [v1.3 → v1.4](/migrations/migration-1.3-to-1.4) | 2026-05-15 | Per-entity-type read surface completes — counter / meter / register / action-profile member / action-profile group reads with the shared query-builder shape. BMv2 register-read UNIMPLEMENTED limitation surfaced. |
22+
| [v1.4 → v1.5](/migrations/migration-1.4-to-1.5) | 2026-05-15 | Packet replication engine reads — multicast group + clone session via name-less typed query builders. Shared Replica / BackupReplica records (BackupReplica is the first P4Runtime-1.5.0-spec-level type to land in jp4). |
23+
24+
## Reading order
25+
26+
If you're upgrading several versions at once (e.g. v1.1 → v1.5), read each intermediate guide in order — each one is scoped to a single adjacent transition, and concatenating their advice covers the full distance.
27+
28+
If you're starting fresh on v1.5 and just want to know what's new since you last looked, the [v1.4 → v1.5 guide](/migrations/migration-1.4-to-1.5) is the most recent.
29+
30+
## Why this section is English-only
31+
32+
Migration guides document a fixed past API delta — they describe what changed in a specific release and do not get retranslated each release. The guides are linked from both the English and Chinese sidebars; the underlying content is English.
33+
34+
## Related
35+
36+
- [CHANGELOG](https://github.com/zhh2001/jp4/blob/main/CHANGELOG.md) — release-note form of the same information, plus the v1.x roadmap.
37+
- [Getting started](/guides/getting-started) — entry guide for users on the current version (v1.5).
38+
- [API reference](/api/) — categorised navigation of the v1.5 public surface plus the full Javadoc.

0 commit comments

Comments
 (0)