Goal: a user can go get inkssg and have a site running in minutes. No config needed for simple sites.
-
inkssg.Build()— no args, defaults to current directory -
inkssg.Build(dir)— explicit path (same behavior as CLI) - Auto-detect site structure (no
ink.yamlrequired) - Defaults:
minimaltheme,public/output,pages/dir - Clear error if not a valid site
-
inkssg build— callsinkssg.Build(".") -
inkssg new <path>— scaffold from template -
inkssg version
- Discover pages under
pages/<name>/ - Parse YAML frontmatter from
content.mdandcontent.html - Render markdown with goldmark (autoid for headings)
- Pass HTML body through unchanged for
content.html - Apply
themes/<name>/layout.htmlviahtml/templatewith{{.Site}},{{.Page}},{{.Content}} - Output
<name>.htmlat root ofpublic/ - Build all pages, report all errors, exit non-zero on any failure
- Output:
✓ <page> → <file>per page + summary line
- Theme resolution: local
themes/<name>/→ built-in (embedded) → error - Built-in
minimaltheme shipped viago:embed - Built-in
devtooltheme for dev tool landing pages - Theme requires only
layout.html; styles/script optional - Copy theme
styles.css,script.jstopublic/themes/<name>/
- Copy
assets/*→public/assets/(one rule, no per-page folders)
-
examples/library/—go run main.gobuilds the site -
examples/minimal/— 1 page, default theme -
examples/multi-page/— multiple pages, shared theme - CI: build every example on push
Note: ink.yaml is optional in v0.1. Add it only when you need site-wide data (name, links, bio).
-
inkssg serve— local server with file watcher and auto-rebuild - Options:
FromConfig,WithTheme,WithOutputDir,WithPagesDir - Hooks:
BeforeBuild,AfterBuild - CSS/JS minification
- Sitemap generation
-
inkssg theme eject <name>— copy built-in theme into localthemes/ -
inkssg theme list— show available themes - "Did you mean" suggestions on typos
-
inkssg validate— check config without building
-
inkssg build --strict— fail on warnings (broken links, missing alt text)
-
inkssg theme add <git-url>— clone a theme repo intothemes/
- Hot module replacement
- React/JSX / typed templates
- Plugin system
- Theme inheritance
- i18n
- Image optimization pipeline
- Blog post collections / RSS / drafts
If you need those, use Astro, Next, or Hugo.