โšก Onwuachi Control Plane

Hugo CLI Cheatsheet

Overview

The Platform Foundation Hugo CLI consists of a growing collection of helper scripts that automate common documentation tasks.

Rather than manually creating directories, copying _index.md files, selecting archetypes, and remembering build commands, the CLI standardizes those operations into repeatable commands.

Why It Matters

Documentation should be as easy to create as code.

By automating repetitive tasks, contributors can focus on writing high-quality content instead of remembering directory structures or Hugo commands.

The CLI also enforces a consistent layout across every knowledge domain.


Where It Fits

Need Documentation
        โ”‚
        โ–ผ
Hugo Helper Script
        โ”‚
        โ–ผ
Scaffold Content
        โ”‚
        โ–ผ
Write Article
        โ”‚
        โ–ผ
Build Hugo Site
        โ”‚
        โ–ผ
Deploy Platform

The Big Picture

The helper scripts are located in:

tools/hugo/

Current toolkit:

create-kb-domain.sh
create-kb-bottle.sh
create-kb-article.sh

(build.sh)
(refresh.sh)
(publish.sh)

As the platform evolves, additional automation scripts will be added to this directory.


Core Commands

Create a Knowledge Base Domain

tools/hugo/create-kb-domain.sh beer

Creates:

content/kb/beer/

including all standard subsections.


Create a Bottle Review

tools/hugo/create-kb-bottle.sh \
beer \
goose-island-bourbon-county-brand-stout

Creates:

content/kb/beer/bottles/goose-island-bourbon-county-brand-stout.md

using the appropriate archetype.


Create a Knowledge Article

tools/hugo/create-kb-article.sh \
infrastructure \
hugo \
hugo-cli-cheatsheet

Creates:

content/kb/infrastructure/hugo/hugo-cli-cheatsheet.md

using the shared KB article archetype.


Build Workflow

Future helper scripts will automate the build process.

Build

tools/hugo/build.sh

Equivalent to:

docker build -t hugo .

Refresh

tools/hugo/refresh.sh

Equivalent to:

platform refresh hugo

Publish

tools/hugo/publish.sh

Will eventually automate:


Engineering Analogy

The helper scripts serve the same purpose as Terraform modules.

Rather than repeatedly performing low-level operations, they encapsulate best practices behind a consistent interface.

Just as Terraform modules reduce infrastructure duplication, the Hugo CLI reduces documentation boilerplate.


Best Practices


Common Mistakes


Pro Tip

If you perform the same documentation task more than two or three times, consider adding a new helper script to the Hugo CLI rather than repeating the manual workflow.


Key Takeaways


Related Articles


References

System Context

โ† Back to Kb