Site templates
site.template in your curvenote.yml sets the theme that curvenote start, curvenote build and curvenote deploy use to render your site. The default is the Curvenote theme, and curvenote init writes it into every new project:
site:
template: curvenote@latest
Figure 1:A project rendered by curvenote start in the Curvenote theme, the default site template.
The Curvenote theme¶
curvenote is a short name for the Curvenote theme, whose source lives at github
curvenoteandcurvenote@latestuse thelatestbranch of the theme, and pick up new releases when you download the theme again (see Caching and pinning).curvenote@<ref>uses a tag, branch or commit of the theme, for examplecurvenote@v2.3.1. Use a tag or commit to pin your site to one version.
When you run curvenote start, the CLI downloads the theme on first use, builds your pages and prints a link to the running site:

Figure 2:curvenote start downloads the Curvenote theme for curvenote@latest, then serves the site.
The link ends in ?params=, a base64url-encoded JSON object that tells the theme which CLI version started it, for example {"version":"0.17.6"}.
What site.template accepts¶
| Value | What the CLI uses |
|---|---|
| Omitted | The default, curvenote@latest |
curvenote or curvenote@latest | The latest branch of the Curvenote theme |
curvenote@v2.3.1 (or any tag, branch or commit) | That tag, branch or commit of the Curvenote theme |
./my-theme | A local folder that contains a template.yml |
https://github.com/org/repo/archive/refs/tags/v1.2.0.zip | That zip, as written |
https://github.com/org/repo, https://github.com/org/repo.git, git@github.com:org/repo.git, github.com/org/repo | The main branch of the repository, as a zip |
https://github.com/org/repo@v1.2.0 (or @latest, @main, @<commit>) | That tag, branch or commit of the repository |
https://github.com/org/repo/releases/tag/v1.2.0 | The v1.2.0 tag, as a zip |
Templates you build yourself work the same way: point site.template at a local folder while you develop the template, then at its GitHub repository or a release zip when you share it. To change how individual parts of a page render without a whole template, use site render plugins instead.
A site template is code that runs on your machine when you start or build a site. Only use templates you trust.
Values the CLI ignores¶
Any other value falls back to the default template, and the CLI prints a warning that names the value it ignored. That includes:
other theme names, such as
book-themeorCurvenotehosts other than
github.com, andhttp://URLsfiles that are not zip archives
GitHub
/tree/and/blob/linksa bare
owner/repo

Figure 3:A site.template the CLI does not accept, such as book-theme, falls back to the Curvenote theme with a warning.
Projects that set site.template: book-theme or another theme name now render with the Curvenote theme. To keep using a different theme, point site.template at its GitHub repository or a local copy of it.
The --template option¶
curvenote start --template <value> overrides site.template for one run and follows the same rules. If the CLI does not accept the value, it prints a warning and uses site.template from your curvenote.yml instead.
curvenote start --template curvenote@v2.3.1Caching and pinning¶
Downloaded templates are kept in _build/templates/site/, one folder per URL, and are not downloaded again. To pick up a newer version of a branch such as latest, delete them and start again:
curvenote clean --templates
curvenote startTo stay on one version, use a tag or commit instead of a branch. If a branch and a tag share a name, GitHub chooses one; use a /releases/tag/<tag> link or a .../archive/refs/tags/<tag>.zip URL to ask for the tag.
If your project has a folder named curvenote that contains a template.yml, site.template: curvenote uses that folder rather than the Curvenote theme. Write ./curvenote to make that explicit.
How commands write site.template¶
curvenote init,curvenote cloneandcurvenote pullwritecurvenote@latestintosite.template.curvenote init --github <url>replaces a missing or ignoredsite.templatein the clonedcurvenote.ymlwithcurvenote@latest, and warns. Values the CLI accepts are left alone.Commands that rewrite
curvenote.ymlkeepsite.templateexactly as you wrote it, even when the CLI resolves it to a zip URL to download.
- CLI
- Command Line Interface
- JSON
- JavaScript Object Notation
- URL
- Uniform Resource Locator