This directory contains a Hugo web site published via Netlify to https://kptdocs.netlify.app what is redirected to https://kpt.dev/.
When the main branch of this repo is updated a fresh build and deploy of the website is executed. Recent Netlify
builds and deployments are listed at https://app.netlify.com/sites/kptdocs.
Add content by adding Markdown files to directories in ./content.
Update layouts for each content type in ./layouts.
Configuration is set in config.toml.
To set up a local dev environment make sure you have npm installed, then run the following from this folder:
npm installThen run the site using make serve.
The site pulls some dependencies via Git submodules. If npm install succeeds but the site fails to build (for example, missing theme assets), initialize submodules and try again:
git submodule update --init --recursive-
Use US English in the documentation
-
Do not manually add a table of contents to the documents. Hugo and Docsy take care of this.
-
Do not use H1 (#) headers in the documents. Docsy generates an H1 header for every document consistent with the title of the document. Start the headings with H2 (##)
-
There are three alert types available based on the importance of the information:
Alert type Code Alert color Note color="primary"Blue Warning color="warning"Yellow Critical color="danger"Red Make sure not to change the alert title. It should always be either
Note,Warning, orCritical.{{%/* alert title="Note" color="primary" */%}} Important information here. {{%/* /alert */%}} -
If you add any commands to the content inline, surround the command with backticks (` `), like
ls -la -
Do not surround IP addresses, domain names, or any other identifiers with backticks. Use italics (for example,
*example.com*) to mark any inline IP address, domain name, file name, file location, or similar. -
Whenever possible, define the type of code for your code blocks
```shellfor all shell blocks```golangfor all Go blocks```yamlfor all YAML blocks```yangfor all YANG blocks- a full list of language identifiers is available here
-
Links to other kpt doc pages should be absolute:
- Correct:
[pkg]: /reference/cli/pkg/get/ - Incorrect:
[pkg]: ../../../reference/cli/pkg/get
- Correct:
-
Flags must appear after positional args:
- Correct:
kpt fn eval my-package --image ghcr.io/kptdev/krm-functions-catalog/search-replace- Incorrect:
kpt fn eval --image ghcr.io/kptdev/krm-functions-catalog/search-replace my-package -
The name of the tool should always appear as small caps (even at start of sentences) and not in block quotes:
- Correct: kpt
- Incorrect:
kpt - Incorrect: Kpt
- Incorrect: KPT
- References to a particular KRM group, version, kind, field should appear with inline quotes:
- Correct:
ConfigMap - Incorrect: ConfigMap
-
Do not add any TBDs to the documentation. If something is missing, create an issue for it.
-
Do not prefix shell commands with
$in code blocks that contain only commands. Use$only when a block shows both the command and its output, to distinguish the command from the output:
- Correct (command only):
kpt fn render my-package- Correct (command + output):
$ kpt fn render my-package
Package "my-package":
[PASS] "ghcr.io/kptdev/krm-functions-catalog/set-labels:latest"- Incorrect (command only with $):
$ kpt fn render my-packageLicensed under the Creative Commons Attribution 4.0 International license