Developers
For a complete example see carbonlifeforms/example.
A site folder
Each site is a folder. Content is managed by the app schema and lives in an SQLite database in that folder. Publish writes public/ as HTML, CSS, and media. The published files do not need the app and can be deployed anywhere.
site.toml is the site manifest, it names the site and any plugins. theme/ is the layout. plugins/<id>/ is that plugin's manifest and templates.
The example is site.toml, theme/layout.html, and plugins/pages/plugin.toml.
A template
A template is a site folder plus template.toml. Templates can be published to the template marketplace and made available to other users for free or for a fee. The file names the title, the release tag, and screenshots. The release tag is the template version.
The 0.1 catalogue lists two public template repositories:
- Halden,
https://github.com/carbonlifeforms/halden. A product site for a small studio. - PaperMod,
https://github.com/carbonlifeforms/papermod. An opensource Hugo blog template, ported to SiteMill.
New site downloads the tag named in the catalogue, then caches it. The app does not ship a second copy of either tree. Plain, Journal, Leaflet, and Fieldnotes stay in the private repository for tests. They are not in this catalogue.
The example's catalogue file is template.toml. README.md says how to read the comments.
A plugin
plugin.toml names the plugin, a version integer, and a runtime of none or platform. A plugin has at least one collection or one singleton. A collection has fields and a path. A block is a field list plus a partial.
A new collection in a site is a new plugin in that site. extend.toml is specified and not available in this version. 0.1 cannot add a field to someone else's plugin.
A markdown collection is plugins/pages/plugin.toml. It also has a pathless front-page singleton. A block is plugins/notes/plugin.toml and the partial plugins/notes/blocks/margin.html.
What a template is given
Templates are Go html/template. Each file is parsed alone. There is no SQL. The generator supplies .Item, .Items, and .Site.Plugins. The theme layout receives the page body as .Content.
theme/layout.html prints .Content. theme/home.html reads .Site.Plugins. plugins/pages/templates/page.html prints .Item. plugins/notes/templates/list.html ranges .Items.
Blocks and markdown
Halden's pages are a block stack. A block is a card with its own fields. PaperMod's body is markdown. The source is .body. The HTML is .body_html. Raw HTML in the markdown is left out.
The example's markdown is a string in content/pages.json. The note is a block stack in content/notes.json. JSON has no comments. content/README.md explains the rows.
The local agent
SiteMill listens on http://127.0.0.1:47321/mcp. It does not listen on the network. Any process on this computer can call it. The same address is written to Application Support/SiteMill/mcp.json, and My Sites shows the text to paste.
{
"mcpServers": {
"sitemill": {
"url": "http://127.0.0.1:47321/mcp"
}
}
}
The tools are about, list_sites, list_collections, list_items, get_item, create_item, update_item, delete_item, store_media, publish_site, create_site, list_files, read_file, write_file, delete_file, create_plugin, and install_plugin.
about returns the app version and this page. create_item leaves the row as a draft unless status is published. A draft is not in the published site.
create_site takes a name and a catalogue id, a GitHub ref, or nothing. Nothing makes a site with a theme and no sample content.
list_files, read_file, write_file, and delete_file only touch theme/ and plugins/ inside one site. A path that escapes the site is refused. The app, the catalogue manifest, and any other site stay out of reach.
create_plugin writes plugins/id/ in that site, checks plugin.toml, records the plugin, and creates its tables. install_plugin records a plugin folder that is already in the site and creates its tables. Neither one rewrites a plugin inside the app.
An agent may edit the site's templates and may create plugins in that site.