Skip to content

Commit 67d9dcc

Browse files
authored
Merge branch 'main' into docs/proxmox-substrate
2 parents c6c4e9c + 44baa17 commit 67d9dcc

38 files changed

Lines changed: 1527 additions & 1006 deletions

‎CLAUDE.md‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,11 +72,12 @@ Docs are versioned per Cozystack minor release. Each version is an independent c
7272
**Version registration (`hugo.yaml`)**
7373
- `params.latest_version_id` — id of the current/default version
7474
- `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`.
7576
- `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/`.
7677

7778
**Where to add changes**
7879
- 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`)
8081
- Content that also applies to older supported versions → copy the change into each relevant `v*/` directory (no automatic backport)
8182
- Cross-version/landing content → `content/en/docs/_index.md`
8283
- Blog posts are version-independent → `content/en/blog/`

‎CONTRIBUTING.md‎

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ Use this decision table before you start editing:
7777
| Your change is… | Edit here |
7878
|---------------------------------------------------------------------|-------------------------------------------------|
7979
| 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>/` |
8181
| A fix that also applies to an **older supported version** | Copy the change into each relevant `vX.Y/` |
8282
| Cross-version content (the landing page, overview) | `content/en/docs/_index.md` |
8383
| A **blog post** | `content/en/blog/` |
@@ -237,6 +237,7 @@ If you need to understand or change the versioning machinery itself:
237237
- `hugo.yaml` — site-wide config; `params.versions[]` is the list of
238238
registered versions (including `next` with `hidden: true`), and
239239
`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".
240241
- `config/production/hugo.yaml` — production-only overrides; excludes
241242
`docs/next/**` from GitHub Pages builds. Netlify deploy previews set
242243
`HUGO_ENV=preview` so they skip this override.
@@ -250,18 +251,26 @@ If you need to understand or change the versioning machinery itself:
250251
cozystack/cozystack.
251252
- `hack/download_openapi.sh` — fetches `openapi.json` per version at build
252253
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.
258258
- `hack/mirror_latest.sh` calls `hack/mirror_latest.py` after Hugo to copy current
259259
docs to `/docs/` and `/docs/v<major>/`. It also copies translated docs
260260
when they exist. The original landing is published at `/docs/versions/`, with a
261261
link in the version dropdown. Pages and Netlify builds run it; `make serve` does
262262
not. Local `make serve` keeps the version-selection landing and its navigation
263263
links at `/docs/`. The landing template carries `data-docs-version-landing` so
264264
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.
265274
- `layouts/partials/docs-seo.html` supplies canonical and robots rules to the
266275
document head and sitemap. Current numbered docs and their copies canonicalize
267276
to `/docs/`. Older versions remain noindex and stay out of sitemaps.

‎assets/scss/blocks/_nav.scss‎

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -290,6 +290,36 @@ nav.navbar {
290290
}
291291
}
292292
}
293+
294+
// "Older versions" group: native <details>, no JS.
295+
&__older {
296+
summary {
297+
cursor: pointer;
298+
list-style: none;
299+
300+
&::-webkit-details-marker {
301+
display: none;
302+
}
303+
304+
// Same caret as .dropdown-toggle, flipped when the group is open.
305+
&::after {
306+
content: "";
307+
float: right;
308+
margin-top: 0.5em;
309+
border-top: 0.3em solid;
310+
border-right: 0.3em solid transparent;
311+
border-left: 0.3em solid transparent;
312+
}
313+
}
314+
315+
&[open] > summary::after {
316+
transform: rotate(180deg);
317+
}
318+
319+
ul .dropdown-item {
320+
padding-left: 1.75rem;
321+
}
322+
}
293323
}
294324

295325
// Fixed-header offset.
89.9 KB
Loading
84 KB
Loading
53.8 KB
Loading
58.6 KB
Loading
64.8 KB
Loading
98 KB
Loading
40 KB
Loading

0 commit comments

Comments
 (0)