Contribute to Docs
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:
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 tagThese params are embedded in install command examples across the docs via
{{< param "driver_version" >}}. Updating them here updates every code sample automatically.Update
site/content/docs/install.mdif the install procedure changed (new flags, new prerequisites, updated verification steps).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.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:
| Param | Example value | Use for |
|---|---|---|
driver_version | 0.4.1 (no v prefix) | Helm --version flags and any bare chart version |
driver_release_tag | v0.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 exampletree/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/:
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 builds | netlify.toml |
| Minimum Hugo version enforced locally, plus all site configuration | site/hugo.toml |
| Docsy theme version this site pins | site/go.mod |
| npm scripts and PostCSS dependencies | site/package.json |
| How to install Hugo on any OS (use the extended build) | Hugo installation docs |
| Docsy theme prerequisites, configuration, and authoring guide | Docsy documentation |