Contribute to Docs

Build and preview this site locally.

The site lives in site/ and is built with Hugo (the extended build) and the Docsy theme.

Quick start

You need Hugo (extended), Go, Node.js (which provides npm), and Git installed. The versions on your machine should meed the minium required versions listed in netlify.toml.

git clone https://github.com/kubernetes-sigs/dra-driver-nvidia-gpu.git
cd dra-driver-nvidia-gpu/site
npm ci          # one-time; installs PostCSS deps from package-lock.json
npm run serve   # http://localhost:1313, live-reload, drafts visible

To produce the same output Netlify builds for production, from site/:

npm run build   # output written to ./public

Updating docs for a release

When a new release is cut, the docs changes are:

  1. Update the version params in site/hugo.toml. Both values must be updated together:

    driver_version = "0.4.1"       # Helm chart version (no "v" prefix)
    driver_release_tag = "v0.4.1"  # GitHub release tag
    

    These params are embedded in install command examples across the docs via {{< param "driver_version" >}}. Updating them here updates every code sample automatically.

  2. Update site/content/docs/install.md if the install procedure changed (new flags, new prerequisites, updated verification steps).

  3. Update site/content/docs/upgrade.md. For a patch release (x.y.Z), add a short new section describing the upgrade from the previous version. For a minor or major release (x.Y.0), the existing upgrade content can be revised in place.

  4. Update any concept or guide pages that describe behavior that changed in the release.

For reference, the release notes live in release-notes/ at the repo root.

Using version site variables in docs

Two version params are defined under [params] in site/hugo.toml:

ParamExample valueUse for
driver_version0.4.1 (no v prefix)Helm --version flags and any bare chart version
driver_release_tagv0.4.1 (with v prefix)GitHub source links to a tagged path

Use these params anywhere the docs refer to the current release:

  • driver_version — any command that takes --version, or prose that names the chart version.
  • driver_release_tag — any link to files or directories at a tagged release (for example tree/v0.4.1/demo), or prose that names the GitHub release tag.

Do not hardcode version strings in docs content unless you are calling out behavior that is specific to a particular driver version (for example an upgrade note that applies only when moving from 0.3.x to 0.4.0).

Reference the param with the Docsy param shortcode.

In prose:

Install driver release {{< param driver_release_tag >}} with chart version {{< param "driver_version" >}}.

In a fenced code block:

helm install dra-driver-nvidia-gpu oci://registry.k8s.io/dra-driver-nvidia/charts/dra-driver-nvidia-gpu \
    --version {{< param "driver_version" >}} \
    --create-namespace \
    --namespace dra-driver-nvidia-gpu \
    --set gpuResourcesEnabledOverride=true

For a link to a tagged source file, place {{< param driver_release_tag >}} in the GitHub URL after /blob/:

values.yaml

When adding syntax examples to this contribute page, escape shortcode delimiters in text code blocks ({{< ... >}}) so Hugo shows the source literally instead of substituting the current version.

Where to look for more details

If you need to know…Look at
Exact Hugo / Go / Node versions used for production buildsnetlify.toml
Minimum Hugo version enforced locally, plus all site configurationsite/hugo.toml
Docsy theme version this site pinssite/go.mod
npm scripts and PostCSS dependenciessite/package.json
How to install Hugo on any OS (use the extended build)Hugo installation docs
Docsy theme prerequisites, configuration, and authoring guideDocsy documentation