Skip to main content

Versioning – Documentation & Feature Catalog

The cockpitOS documentation (and thus the Center Website Feature Catalog) can be versioned. This allows for releases to be represented and older states to be retrieved.


How does versioning work?

  • Docusaurus manages documentation versions using the command docs:version.
  • When creating a new version, the current state of docs/ is copied into a versioned folder (e.g., versioned_docs/version-1.0.0/).
  • A Version Dropdown appears in the navigation; users can choose between "Current" and older versions (e.g., 1.0.0, 0.9.0).

Creating a new version

In the project cockpit-docs (Root: cockpit-docs/):

cd cockpit-docs
npm run docusaurus docs:version 1.0.0
  • Creates version 1.0.0 from the current state of docs/.
  • The Feature Catalog under docs/center-website/ is versioned as well.
  • Optional: A version badge or label (e.g., "Current," "Next") can be configured in docusaurus.config.ts.

Recommendations for Releases

  • Before a release of the Center Website or the documentation: Review content in docs/center-website/ and update the Feature Catalog if necessary.
  • Afterward: Run npm run docusaurus docs:version x.y.z so that the catalog is versioned to this release state.
  • Changelog: Optionally maintain a page docs/center-website/changelog.md and link it in the sidebar ("Changes per Version").

Configuration (optional)

In docusaurus.config.ts, the behavior of versioning can be adjusted, for example:

  • lastVersion: 'current' – current version as default
  • versions – labels for "current" and older versions

The default settings of the preset are usually sufficient. Note: The version dropdown in the navbar appears only after npm run docs:version x.y.z has been executed at least once – until then, only the "current" (unversioned) documentation is available.

Nutzungsstatistik: Seitenaufrufe werden anonymisiert erfasst. Im Umami-Dashboard nach diesem Pfad filtern: /en/center-website/versioning