You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 67d9dcc
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: CLAUDE.md
+2-1Lines changed: 2 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -72,11 +72,12 @@ Docs are versioned per Cozystack minor release. Each version is an independent c
72
72
**Version registration (`hugo.yaml`)**
73
73
-`params.latest_version_id` — id of the current/default version
74
74
-`params.versions[]` — ordered list consumed by the version switcher (`layouts/partials/version-switcher.html`). Newest goes first, `order` highest. **When adding a new version, update both fields.**
75
+
-`params.versions_visible` — how many of the newest non-hidden versions (ranked by `order`, minimum 1) stay in the switcher, the version table and the sidebar tree on the version-selection page (`/docs/versions/`); the rest are grouped under "Older versions". `hack/register_version.sh` needs no change: a new release pushes the oldest visible version into the group on its own. The split lives in `layouts/partials/docs-versions.html`.
75
76
-`hidden: true` on a version entry hides it from the dropdown selector. Combined with the content mount exclusion pattern (`- '! docs/<id>/**'`), the whole version is also excluded from production builds. Used for the `next` trunk; the dev server and Netlify deploy previews still render it at `/docs/next/`.
76
77
77
78
**Where to add changes**
78
79
- Docs for an upcoming (unreleased) feature → edit `content/en/docs/next/`. These materialize as `v<next-release>/` when `make release-next RELEASE_TAG=vX.Y.Z` runs
79
-
- Bug fix or addition to the current release → edit only `content/en/docs/<latest_version_id>/` (currently `v1.2`)
80
+
- Bug fix or addition to the current release → edit only `content/en/docs/<latest_version_id>/` (the `params.latest_version_id` value in `hugo.yaml`)
80
81
- Content that also applies to older supported versions → copy the change into each relevant `v*/` directory (no automatic backport)
| A doc for a **feature that ships in a future release**|`content/en/docs/next/`|
80
-
| A **bug fix** or addition **for the current release**|`content/en/docs/<latest_version_id>/`(`v1.2`)|
80
+
| A **bug fix** or addition **for the current release**|`content/en/docs/<latest_version_id>/`|
81
81
| A fix that also applies to an **older supported version**| Copy the change into each relevant `vX.Y/`|
82
82
| Cross-version content (the landing page, overview) |`content/en/docs/_index.md`|
83
83
| A **blog post**|`content/en/blog/`|
@@ -237,6 +237,7 @@ If you need to understand or change the versioning machinery itself:
237
237
-`hugo.yaml` — site-wide config; `params.versions[]` is the list of
238
238
registered versions (including `next` with `hidden: true`), and
239
239
`params.latest_version_id` is the current stable.
240
+
-`params.versions_visible` (in `hugo.yaml`) — how many of the newest released versions, ranked by `order` (minimum 1), stay in the version switcher, the version table and the sidebar tree on the version-selection page (`/docs/versions/`); the rest are grouped under "Older versions".
`docs/next/**` from GitHub Pages builds. Netlify deploy previews set
242
243
`HUGO_ENV=preview` so they skip this override.
@@ -250,18 +251,26 @@ If you need to understand or change the versioning machinery itself:
250
251
cozystack/cozystack.
251
252
-`hack/download_openapi.sh` — fetches `openapi.json` per version at build
252
253
time (v1.1+; v0 and v1.0 ship their `api.json` in-tree).
253
-
-`layouts/docs/docs-landing.html` — the version-selection landing template,
254
-
published at `/docs/versions/`; builds the version table from `params.versions[]`,
255
-
filtering out hidden entries.
256
-
-`layouts/partials/version-switcher.html` — top-navbar version dropdown;
257
-
filters out hidden entries.
254
+
-`layouts/partials/docs-versions.html` — splits `params.versions[]` into the newest `params.versions_visible` released versions and the older rest, skipping hidden entries; shared by the three consumers below.
255
+
-`layouts/docs/docs-landing.html` — the version-selection landing template, published at `/docs/versions/`; builds the version table from that split, with the older versions in a collapsed block.
256
+
-`layouts/partials/version-switcher.html` — top-navbar version dropdown; lists the recent versions and puts the older ones under an "Older versions" disclosure that is open when the current page belongs to one.
257
+
-`layouts/partials/sidebar-tree.html` — on the version-selection landing it leaves out the roots of older versions.
258
258
-`hack/mirror_latest.sh` calls `hack/mirror_latest.py` after Hugo to copy current
259
259
docs to `/docs/` and `/docs/v<major>/`. It also copies translated docs
260
260
when they exist. The original landing is published at `/docs/versions/`, with a
261
261
link in the version dropdown. Pages and Netlify builds run it; `make serve` does
262
262
not. Local `make serve` keeps the version-selection landing and its navigation
263
263
links at `/docs/`. The landing template carries `data-docs-version-landing` so
264
264
repeat mirror runs can identify it independently of Open Graph metadata.
265
+
-`data/docs-legacy-urls.json` maps old English URLs to current docs or a numbered
266
+
archive. The same generator serves full HTML copies at those paths, with the
267
+
source page's canonical and robots policy. Current-doc mappings also produce
268
+
their major-version paths. There is no redirect, so queries and existing
269
+
fragments stay on the requested URL. Copies carry `data-docs-legacy-url` and
270
+
are tracked in the manifest. Missing targets, symlinks and collisions with
271
+
real pages fail before output is replaced.
272
+
`distro-hosted` uses the v0 archive; the old LINSTOR path uses the storage
273
+
overview because its exact historical page was not identified.
265
274
-`layouts/partials/docs-seo.html` supplies canonical and robots rules to the
266
275
document head and sitemap. Current numbered docs and their copies canonicalize
267
276
to `/docs/`. Older versions remain noindex and stay out of sitemaps.
0 commit comments