Getting Started @ stwoo.net

Install

Source not published yet — install instructions coming once the repo is public.

Verify the environment:

gohyde doctor
#   Gohyde Doctor
#   ✓ Go 1.23
#   ✓ Dart Sass 1.69.5
#   ✗ Tailwind CSS (not installed)
#   ✓ Python 3.11  ✓ Ruby 3.2

Scaffold a site

gohyde new myblog
cd myblog
npm install          # one-time: installs the Tailwind 4 CLI
gohyde serve          # dev server + live Tailwind at http://localhost:4000

gohyde new writes a full blog theme: Tailwind 4 styling (single --color-brand-500 variable to rebrand), Alpine.js mobile menu, dark/light mode with a no-flash toggle, a post blueprint for the CMS, a sample Python plugin, and three example posts. gohyde new --blank writes a minimal _config.yml and empty dirs instead.

Layout produced:

myblog/
├── _config.yml          # site config: collections, blueprints, nav, tailwind
├── _layouts/            # default, home, blog, post, page
├── _includes/           # header (nav + theme toggle), footer, post-card, head
├── _posts/              # dated blog posts: YYYY-MM-DD-title.md
├── _pages/              # standalone pages (about, blog index)
├── _plugins/            # reading_time.py — example Python plugin
├── _data/               # data files (.yml/.json/.csv) → site.data.*
├── assets/css/input.css # Tailwind source (brand color, article styles)
├── package.json         # @tailwindcss/cli dev dependency
├── Makefile             # make build = minified CSS + gohyde build
└── index.md             # home page

Build

gohyde build              # full build → _site/ (default) or _builds/
gohyde build --incremental  # only rebuild changed files (uses .gohyde-cache.json)
gohyde build --watch      # rebuild on file change
gohyde build --profile    # print the slowest pages

Output goes to destination from _config.yml (default _site; some sites use _builds). Like Jekyll, a full build removes destination files it didn’t produce this time (output of deleted or renamed pages), except keep_files: entries (default .git, .svn). --incremental builds skip that cleanup.

Unchanged output isn’t rewritten: when a page, static file or asset would come out byte-identical (for large media: same size, not older than the source), the existing file is kept and only its modification time is updated. Deploy tools that compare modification times (rsync -u, lftp mirror) still see every file as fresh, exactly as after a full rewrite; tools that compare content or checksums see no change.

Why is my build slow?

GOHYDE_PHASES=1 gohyde build            # time per build phase, on stderr
gohyde build --profile                  # slowest pages (render time only)
GOHYDE_CPUPROFILE=cpu.prof gohyde build # Go CPU profile → go tool pprof -top cpu.prof
GOHYDE_MEMPROFILE=mem.prof gohyde build # heap profile at exit

Common culprits are external tools rather than rendering: the Tailwind CLI (Node startup, a few hundred ms — it runs alongside the build), Python/Ruby plugin startup (plugins start in parallel), and the first Sass compile (the compiler is started early when the site has any .scss/.sass). Gohyde runs with GOGC=200 for speed; set GOGC yourself to trade speed for memory.

Serve

gohyde serve              # http://localhost:4000, live reload, CMS at /_gohyde
gohyde serve --port 8080 --no-cms

serve always watches the source tree via fsnotify and reloads the browser on change — the --watch flag is a no-op there (it only matters for build).

Project conventions