Use rtgl sites commands through local scripts for version pinning.
Commands
| Command | Purpose |
|---|---|
rtgl sites init <project-name> |
Scaffold a new site from template |
rtgl sites build |
Build static output |
rtgl sites watch |
Build, serve, and rebuild on file changes |
init
rtgl sites init my-site
rtgl sites init my-site --template default
Options:
-t, --template <name>template name (default:default)
Important:
rtgl sites init --template ...only selects scaffold templates bundled with the CLI.- For current releases, that scaffold set is
default. - Built-in page templates like
landing-features,blog-article-list, andblog-articleare import aliases configured insites.config.yamlfrom@rettangoli/sitekit, notinittemplate names. - See Built-in Templates & Partials for import URLs and data contracts.
build
rtgl sites build
rtgl sites build --root-dir . --output-path dist
rtgl sites build --quiet
Options:
-r, --root-dir <path>site root (default:./)-o, --output-path <path>output path (default:./_site)-q, --quietsuppress non-error logs--rootDirlegacy alias for--root-dir--outputPathlegacy alias for--output-path
watch
rtgl sites watch
rtgl sites watch --port 4173
rtgl sites watch --reload-mode full --quiet
Options:
-p, --port <port>dev server port (default:3001)-r, --root-dir <path>site root (default:.)-o, --output-path <path>output path (default:./_site)--reload-mode <mode>body(default) orfull-q, --quietsuppress non-error logs--rootDirlegacy alias for--root-dir--outputPathlegacy alias for--output-path
Recommended scripts
{
"scripts": {
"watch": "rtgl sites watch -p 4173 -o dist",
"build": "rtgl sites build -o dist"
}
}