- Read this file for site overview
- See
~/Sites/hugo/CLAUDE.mdfor workspace-level Hugo context - See
~/Sites/hugo/modules/hugo-claris/root/CLAUDE.mdfor theme details - See
specs/spx-website.prd.mdfor product requirements - See
specs/decisions/for architectural decisions
This is the documentation and marketing website for SPX - Spec-Driven Development, built with Hugo using the hugo-claris theme.
SPX is a framework combining:
- spx CLI: Fast, deterministic workflow management (<100ms, zero token cost)
- SPX-Claude: Claude Code marketplace with plugins for testing, coding, and documentation
content/
├── _index.md # Marketing landing page
├── cli/ # spx CLI documentation
│ └── _index.md # CLI section landing
├── marketplace/ # SPX-Claude marketplace docs
│ └── _index.md # Marketplace section landing
├── concepts/ # Spec-driven development methodology
│ └── _index.md # Concepts section landing
└── about/ # Project information
└── index.md # About page
specs/
├── spx-website.prd.md # Product requirements document
├── decisions/
│ └── adr-21_hugo-cloudflare-stack.md # Hugo + Cloudflare architecture decision
└── work/
├── backlog/ # Future work items
├── doing/ # Active work items
└── done/ # Completed work items
HUGO_CLARIS_AUTHOR_EMAIL: REQUIRED. Set in.envfile.
cd ~/Sites/hugo/sites/spx.sh/spx.sh-root
# Development server (port 1613)
npm run devel
# Production build (uses published module versions)
npm run build
# Production build (uses local module worktrees)
npm run build:workspaceOutput goes to public/.
| Script | Purpose |
|---|---|
devel |
Development server on port 1613 (go.devel.work) |
stage |
Staging server on port 1614 (go.stage.work) |
prod |
Production server on port 1615 (go.mod versions) |
build |
Production build using published module versions |
build:workspace |
Production build using go.main.work |
build:workspace:devel |
Production build using go.devel.work |
build:workspace:stage |
Production build using go.stage.work |
clean |
Remove public/ and resources/_gen/ directories |
rebuild:workspace |
Shortcut for clean + build:workspace |
npm ci # Install Node.js dependencies (required)
hugo mod npm pack # Regenerate package.json from package.hugo.json| Branch | Environment | Deployment URL | Trigger |
|---|---|---|---|
main |
Production | https://spx.sh | Push to origin/main |
stage |
Staging | https://stage.spx.sh | Push to origin/stage |
devel |
Development | localhost:1613 | Local only |
The go.work file references local module checkouts:
// go.work
go 1.21
use ../../../modules/hugo-claris/root // devel branch of theme
use ../../../modules/claris-resources
use ../../../modules/fontawesomeChanges in hugo-claris/root/ are immediately visible without committing.
- Static Site Generator: Hugo (extended edition, 0.153.x)
- Theme: Hugo Claris (Go Module)
- Hosting: Cloudflare Pages
- CI/CD: GitHub Actions
- Languages: HTML, CSS, JavaScript, Go (templates)
See ADR: Hugo + Cloudflare Stack for architectural rationale.
| File | Purpose |
|---|---|
package.hugo.json |
Source of truth - edit this file only |
package.json |
Generated - DO NOT EDIT (overwritten) |
IMPORTANT: Only modify package.hugo.json. The package.json file is auto-generated by hugo mod npm pack and will be overwritten. This includes both dependencies AND scripts.
To add/remove dependencies or modify scripts:
- Edit
package.hugo.jsonin the project AND any modules that declare it - Run
hugo mod npm packto regeneratepackage.json - Run
npm cito updatenode_modules
CRITICAL: Hugo 0.154+ has breaking changes with the hugo-claris theme. Use hvm (Hugo Version Manager) to ensure correct version:
# npm scripts automatically use hvm
npm run dev # Uses hvm for correct Hugo version
npm run build:workspace # Uses hvm for correct Hugo version# Update a module dependency (module commands don't need env vars)
hugo mod get -u github.com/simonheimlicher/hugo-claris
# Clear module cache
hugo mod cleanCRITICAL: For running the server or building, ALWAYS use npm scripts:
npm run devel- Development servernpm run build:workspace- Production build with local modules
NEVER call hugo server or hugo --gc --minify directly - they will fail without env vars loaded by dotenvx and correct Hugo version from hvm.
Create page bundles in the appropriate section:
# New CLI documentation page
mkdir -p content/cli/commands
cat > content/cli/commands/index.md << 'EOF'
---
title: Commands Reference
description: Complete reference for spx CLI commands
date: 2025-01-17
---
Your content here...
EOF---
title: Page Title
subtitle: Optional subtitle
description: SEO description (shown in search results)
date: 2025-01-17T00:00:00+0100
lastmod: 2025-01-17
keywords:
- keyword1
- keyword2
---From hugo-claris theme:
{{% lede-initial %}}First paragraph emphasis{{% /lede-initial %}}{{< panel page="/cli" float=left relativewidth=45 >}}Panel content{{< /panel >}}
After npm run build:workspace:
# Check generated pages
ls -la public/
ls -la public/cli/
ls -la public/marketplace/
ls -la public/concepts/
# Check CSS bundles
find public/styles -name "*.css" -exec sh -c \
'echo "$1: $(wc -c < "$1") bytes"' _ {} \;
# Check inline critical CSS
grep -o '<style[^>]*>' public/index.html | head -5