Themes
A theme decides how your site looks: the HTML of every page, its CSS, its fonts and its images. This section is for web developers who know HTML, CSS and a template language, and are new to Hatamoto. You can start small: a theme that holds one template and one stylesheet already works, because Hatamoto fills in everything else from its built-in theme.
The guides take you from your first theme to a signed package you install on your real site. The reference pages list every file, template function, field kind and rule, for when you need the exact detail. If you have never built a Hatamoto theme, start with Build your first theme.
Guides
- Your first theme
Make a small theme with one template and one stylesheet, push it to a development site and watch your changes go live.
- How themes work
See which files a theme is made of, how Hatamoto picks the template for each page, and how to install, preview and switch themes.
- Colours and fonts
Set your theme's colours and fonts in CSS, let the site owner override them in the admin, and add a setting of your own.
- Add a section
Add a new block type to your theme that editors can place on any page and fill in from a form.
- Preview and dev
Work on a theme with live updates on a development site, then preview it on your real site before anyone else sees it.
- Package and share
Turn your theme folder into one signed file, install it on your real site, update it later and remove it when you no longer need it.
Reference
- Layout
Every file a theme can hold, which template draws which kind of page, the data each template receives, and worked examples.
- Template functions
Every function you can call from a theme template, with what it returns and how it behaves on bad input.
- Sections
How section templates and their field lists work, the supported schema rules, every field kind, and the sections the built-in theme ships.
- Builder contract
What a theme must keep so the visual editor can show and edit its pages, plus the optional design token and layout part settings.
- Assets, icons, feeds
How a theme's stylesheets, scripts, fonts and icons are served and cached, plus feeds, internal links and the places plugins add files.
- Engine details
What Hatamoto checks when a theme loads, how rendered pages are cached and cleared, and the known gaps of the built-in theme.
- Preview API
The addresses the admin uses to preview a theme and to draw unsaved pages, with their access rules, limits and safe embedding.
- Package format
What a theme package may contain, the limits it must meet, how signatures and trust work, the registry, and every theme command.