API Reference Generation
Generating Porch API Reference Documentation
This guide explains how to contribute to Porch documentation, including setting up your local environment, previewing changes, and understanding the documentation structure.
Clone using SSH (required for pushing changes):
git clone git@github.com:nephio-project/porch.git
cd porch/docs
SSH authentication links your commits to your GitHub account, which is required for CLA verification. If you haven’t set up SSH keys, see GitHub’s SSH documentation.
Porch documentation uses Hugo Extended edition. Install it for your platform:
macOS (Homebrew)
brew install hugo
Linux (Snap)
sudo snap install hugo
Linux (Download)
wget https://github.com/gohugoio/hugo/releases/download/v0.139.4/hugo_extended_0.139.4_linux-amd64.tar.gz
tar -xzf hugo_extended_0.139.4_linux-amd64.tar.gz
sudo mv hugo /usr/local/bin/
Windows (Chocolatey)
choco install hugo-extended
Verify installation:
hugo version
Expected output should include “extended”:
hugo v0.139.4+extended linux/amd64
From the docs/ directory:
npm install
Start the Hugo development server:
cd docs
hugo server
Open your browser to http://localhost:1313. The site auto-reloads when you save changes.
Useful flags:
hugo server -D - Include draft pageshugo server --disableFastRender - Full rebuild on changeshugo server --bind 0.0.0.0 - Allow external accessPorch documentation is organized in numbered sections:
package-lifecycle.md_index.mdinstalling-porch.md not install.mdEvery page needs front matter:
---
title: "Page Title"
type: docs
weight: 1
description: Brief description for SEO and navigation
---
weight: Controls ordering (lower numbers appear first)description: Appears in navigation and search resultsHeadings: Use sentence case, not title case
## Package lifecycle stages
Code blocks: Always specify language
```bash
kubectl get packagerevisions
```
Internal links: Use Hugo relref shortcodes
See [Package Lifecycle]({{% relref "package-lifecycle" %}}).
External links: Use standard markdown
[Kubernetes documentation](https://kubernetes.io/docs/)
Alerts (info/warning boxes): Use Docsy alert shortcodes
{{% alert title="Note" color="primary" %}}
Important information here.
{{% /alert %}}
Be concise: Get to the point quickly
Use examples: Show, don’t just tell
Verify accuracy: Test commands and examples; include expected command output if reasonably short
Consider audience: Assume Kubernetes familiarity; explain Porch-specific concepts
Avoid jargon: Define terms/expand acronyms on first use, or link to glossary
git checkout -b docs-improve-package-lifecycle
Edit files in docs/content/en/docs/
cd docs
hugo server
Verify your changes at http://localhost:1313
git add docs/content/en/docs/2_concepts/package-lifecycle.md
git commit -m "docs: clarify package lifecycle transitions"
Commit message format:
docs: prefixgit push origin -u docs-improve-package-lifecycle
Open a pull request on GitHub with:
The EasyCLA bot will prompt you to sign the CLA if you haven’t already (see contributing Before You Start).
See API Reference Generation for instructions on regenerating API documentation from Go source code.
Diagrams are stored in docs/static/images/porch/ as .drawio.svg files. Diagrams created in this format can be opened in
the draw.io editor, edited freely, and saved as-is. They can then be referenced in the Markdown files as normal SVG images.
Reference in markdown:

To add a new top-level section:
docs/content/en/docs/13_new_section/13_new_section/_index.mdweight in front matterDocumentation PRs are reviewed by maintainers. Expect feedback on:
Address feedback by pushing additional commits to your branch.
If you have questions:
area/porch label when starting your discussionGenerating Porch API Reference Documentation