Feature: Add Hugo Install Script
IMPLEMENTATION RULES: Before implementing this plan, read and follow:
- WORKFLOW.md - The implementation process
- PLANS.md - Plan structure and best practices
Status: Completed​
Goal: Create install-fwk-hugo.sh so developers can install Hugo Extended via dev-setup.
Completed: 2026-03-20
Last Updated: 2026-03-20
Investigation: INVESTIGATE-hugo-addition.md
Overview​
Hugo Extended is a standalone binary distributed via GitHub releases. The install script follows the same pattern as install-dev-golang.sh — download a tarball, extract to /usr/local/bin, support --version and --uninstall flags.
Hugo Extended (not plain Hugo) is needed because it includes SCSS/SASS support required by most themes including Blowfish.
Phase 1: Create the Install Script — ✅ DONE​
Tasks​
- 1.1 Add
FRAMEWORKScategory — requires changes in 5 places:.devcontainer/additions/lib/categories.sh:- Add table row: order
8, IDFRAMEWORKS, nameFrameworks & Standalone Binaries, tagsframework binary standalone hugo helm, logoframeworks-logo.webp - Add
readonly CATEGORY_FRAMEWORKS="FRAMEWORKS"to constants block (~line 203)
- Add table row: order
.devcontainer/manage/dev-docs.sh— 5 changes needed:- Add
SCRIPTS_FRAMEWORKS=""variable declaration (~line 75) - Add
FRAMEWORKSbranch toadd_to_category()case statement (~line 391) - Add
FRAMEWORKSbranch toget_category_scripts()case statement (~line 407) - Add
FRAMEWORKS) echo "frameworks" ;;toget_category_folder()(~line 425) - Add
name="${name#fwk-}"toget_tool_filename()(~line 432) — without this, URLs mismatch withanchors.ts
- Add
website/src/utils/anchors.ts:- Add
FRAMEWORKS: 'frameworks',togetCategoryFolder()mapping - Add
.replace(/^fwk-/, '')togetToolFilename()
- Add
website/static/img/categories/src/frameworks-logo.svg— category logo- Source: Lucide "blocks" icon (ISC license, permissive) — building-block shapes fitting "frameworks & standalone binaries"
- Download from lucide.dev or the lucide GitHub repo
- 1.2 Create
.devcontainer/additions/install-fwk-hugo.shfollowinginstall-dev-golang.shpattern- Core metadata:
SCRIPT_ID="fwk-hugo",SCRIPT_CATEGORY="FRAMEWORKS" - Default version:
0.157.0 - Check command:
[ -f /usr/local/bin/hugo ] || command -v hugo >/dev/null 2>&1(check install path first per template best practice) - Download from:
https://github.com/gohugoio/hugo/releases/download/v{VERSION}/hugo_extended_{VERSION}_linux-{arch}.tar.gz - Install to:
/usr/local/bin/hugo(single binary, no directory like Go) - Architecture detection:
amd64/arm64 - VS Code extension:
budparr.language-hugo-vscode SCRIPT_COMMANDSfor dev-setup menu: default install,--version,--uninstall,--help- Extended metadata (required for website):
SCRIPT_TAGS="hugo static-site-generator ssg framework web"SCRIPT_ABSTRACT="Hugo Extended static site generator with SCSS/SASS support."SCRIPT_LOGO="fwk-hugo-logo.webp"SCRIPT_WEBSITE="https://gohugo.io"SCRIPT_SUMMARY="Hugo Extended static site generator — the world's fastest framework for building websites. Includes SCSS/SASS compilation, image processing, and VS Code language support. Supports version pinning for theme compatibility."SCRIPT_RELATED=""(no related tools yet in FRAMEWORKS category)
- Core metadata:
- 1.3 Make the script executable:
chmod +x - 1.4 Run static tests:
.devcontainer/additions/tests/run-all-tests.sh static install-fwk-hugo.sh— 27/27 passed
Validation​
User confirms script structure looks correct. Static tests pass.
Phase 2: Logos & Documentation — ✅ DONE​
Tasks​
- 2.1 Add Hugo tool logo to
website/static/img/tools/src/fwk-hugo-logo.svg- Source: Simple Icons Hugo icon (CC0 / public domain)
- Brand color:
#FF4088
- 2.2 Run
dev-logosto convert SVG sources to production WebP (both category and tool logos)- Ran inside devcontainer —
fwk-hugo-logo.webpandframeworks-logo.webpgenerated
- Ran inside devcontainer —
- 2.3 Run
dev-docsto regeneratewebsite/docs/tools/index.mdxand category folders- Generated
website/docs/tools/frameworks/withhugo.mdx,index.mdx,_category_.json - Updated
website/src/data/categories.jsonandtools.json
- Generated
Validation​
dev-docs generated correctly. dev-logos deferred to devcontainer (SVG sources committed). Category and tool appear in JSON data.
Phase 3: Testing (in devcontainer) — ✅ DONE​
Tasks​
- 3.1 Run install:
.devcontainer/additions/install-fwk-hugo.sh— installed 0.157.0 successfully - 3.2 Verify:
hugo version—hugo v0.157.0+extended linux/arm64 - 3.3 Run uninstall:
.devcontainer/additions/install-fwk-hugo.sh --uninstall— removed cleanly - 3.4 Verify:
command -v hugo— not found (PASS) - 3.5 Run with
--version 0.145.0— installedhugo v0.145.0+extended linux/arm64successfully
Validation​
All tests passed. Install, uninstall, and version pinning all work correctly.
Acceptance Criteria​
-
FRAMEWORKScategory appears indev-setupmenu and on website -
install-fwk-hugo.shinstalls Hugo Extended -
--versionflag works for version pinning -
--uninstallremoves Hugo cleanly -
--helpshows usage information - Script is idempotent (safe to run twice)
- Architecture detection works (amd64/arm64)
- Static tests pass
-
dev-setupmenu shows Hugo under Frameworks category -
dev-docsgenerates frameworks category folder and Hugo tool page - Logos render correctly (category + tool)
Files to Create/Modify​
| File | Action |
|---|---|
.devcontainer/additions/install-fwk-hugo.sh | Create — install script |
.devcontainer/additions/lib/categories.sh | Modify — add FRAMEWORKS table row + readonly constant |
.devcontainer/manage/dev-docs.sh | Modify — add FRAMEWORKS to 4 hardcoded category lists + fwk- prefix strip in get_tool_filename() |
website/src/utils/anchors.ts | Modify — add FRAMEWORKS to getCategoryFolder() + fwk- to getToolFilename() |
website/static/img/categories/src/frameworks-logo.svg | Create — Lucide "blocks" icon (ISC license) |
website/static/img/tools/src/fwk-hugo-logo.svg | Create — Simple Icons Hugo icon (CC0) |
Implementation Notes​
Template and pattern to follow​
Base the script on addition-templates/_template-install-script.sh using Pattern 2 (custom prefix):
- Custom
install_hugo_binary()function for the download/extract - Then
process_standard_installationsfor extensions
Libraries to source​
Only source what Hugo needs (not the full set from the template):
source "${SCRIPT_DIR}/lib/tool-auto-enable.sh"
source "${SCRIPT_DIR}/lib/logging.sh"
source "${SCRIPT_DIR}/lib/install-common.sh" # detect_architecture, show_script_help, etc.
source "${SCRIPT_DIR}/lib/core-install-system.sh"
source "${SCRIPT_DIR}/lib/core-install-extensions.sh"
Do NOT source: core-install-go.sh, core-install-node.sh, core-install-python.sh, core-install-pwsh.sh, core-install-dotnet.sh
Binary download approach​
No shared library function exists for tarball downloads. Write an inline install_hugo_binary() function following the same pattern as Go's install_go_binary():
install_hugo_binary() {
local version="$1" arch="$2"
local url="https://github.com/gohugoio/hugo/releases/download/v${version}/hugo_extended_${version}_linux-${arch}.tar.gz"
local temp_file="/tmp/hugo_extended_${version}_linux-${arch}.tar.gz"
curl -fsSL "$url" -o "$temp_file"
sudo tar -C /usr/local/bin -xzf "$temp_file" hugo # extract only the hugo binary
rm -f "$temp_file"
}
Key differences from Go script​
| Aspect | Go | Hugo |
|---|---|---|
| Tarball contents | go/ directory tree | hugo binary + LICENSE + README |
| Install location | /usr/local/go/ (directory) | /usr/local/bin/hugo (single file) |
| PATH changes | Needs .bashrc modification | None — /usr/local/bin already in PATH |
| Uninstall | sudo rm -rf /usr/local/go | sudo rm -f /usr/local/bin/hugo |
| Additional packages | PACKAGES_GO (gopls, delve) | None — Hugo is self-contained |
Other notes​
SCRIPT_VER="0.0.1"per template conventionSCRIPT_DIRusesreadlink -fper template:SCRIPT_DIR="$(dirname "$(readlink -f "$0")")"- Mode flags (
DEBUG_MODE,UNINSTALL_MODE,FORCE_MODE) initialized to 0, exported after parsing