Versioning and stability
Leaf follows semantic versioning from 1.0.0: nothing public breaks before 2.0.
One number, three repositories
Leaf is released as three repositories under the same version number:
zephyrus-framework/leaf-core: the PHP library, on Packagistzephyrus-framework/leaf: the theme and the Composer project template (composer create-project)zephyrus-framework/leaf-cli: theleafbinary, which embeds the theme and leaf-core
Releases
- Patch (1.0.1): fixes.
- Minor (1.1.0): additions that keep everything public working.
- Major (2.0.0): the only kind of release that may break something public.
- Deprecation: something public is deprecated first, with a "Deprecated" line in the changelog, and removed at the next major release.
Public in 1.x
- Configuration: every
config.ymlkey Leaf reads (theleafandlocalizationsections), its default and its meaning. No key is renamed or removed; a new key comes with a default that keeps the output as it was. - Content:
content/<section>/<slug>.mdandcontent/<locale>/..., the front matter keys Leaf reads, the order and the titles taken from file names,locale/and its strings. - Output: the layout of
dist/(page paths, the locale prefix, a404.htmlper locale,sitemap.xml,robots.txt, asearch.jsonper locale) and the fields of asearch.jsonentry (title,section,url,excerpt,headings,content). Fields can be added, never removed or given another meaning. - Templates: the names of the templates Leaf renders (
layouts/docs.latte,layouts/landing.latte,landing.latte,docs/page.latte,404.latte, andhead,nav,footer,sidebar,tocandsearch-modalunderpartials/), the variables each one receives, the globals injected in every template ($leafName,$leafBaseUrl,$localePrefix...) and Leaf's Latte functions and filters (localize...). No variable is removed or changes type.- Not public: the markup and the CSS classes inside the theme's templates,
app.css(except the properties of point 5) and the theme's JavaScript. A template you override belongs to your site: for each release, the theme's changelog names every template, stylesheet or script that changed and what an override must take over.
- Not public: the markup and the CSS classes inside the theme's templates,
- Styling: the theme ships its Tailwind CSS classes compiled with Tailwind CSS 3.4.17, in
assets/css/tailwind.css, and loads no Tailwind script.- No class of that stylesheet goes away in 1.x. The theme's CI checks it against the reference list,
tests/tailwind-classes.txt. - Its colour tokens (
deep,surface,elevated,border,border-accent,body,bright,muted,accent,accent-light,accent-fill,accent-fill-hover,accent-glow) and fonts (font-body,font-mono) stay. - The theme stays on Tailwind CSS 3 for all of 1.x: version 4 changes what classes such as
shadow-sm,roundedorringmean, which only a major release may do. - The CSS custom properties of the theme's Theme section (
--bg-deep,--accent,--text...) are neither renamed nor removed, and neither are the three selectors under whichapp.csssets them::root,[data-theme="light"], and:root:not([data-theme="dark"])inside@media (prefers-color-scheme: light). Set yours under the same three. The rest ofapp.cssis not public. - For a class the stylesheet lacks, the Composer tier compiles the stylesheet again from your templates and Markdown pages (
composer build), and a binary project loads Tailwind from itstemplates/partials/head.latteor brings its own CSS: see Styling a page.
- No class of that stylesheet goes away in 1.x. The theme's CI checks it against the reference list,
- Hooks: the
post_buildentries, how they run (without a shell, as a list of arguments), their environment variables and what a failing hook does. - CLI: the
init,dev,buildandejectcommands and their options, the shape of a binary project, theLEAF_VERSIONandLEAF_PREFIXvariables ofinstall.sh, and the names of the assets of a release (leaf-<os>-<arch>,checksums.txt), which workflows download by name. - PHP API (Composer tier): the public and protected methods of
Leaf\Kernel,BuildCommand,PageDiscovery,DevRouter,StaticSiteBuilder,StaticBuildResult,Config\LeafConfig,Content\ContentLoader,Content\SearchIndexBuilder,Content\MarkdownParser,Content\ParsedMarkdown,Seo\SitemapGenerator,Seo\RobotsGeneratorandLocalization\TranslationLatteExtension.- Internal, marked
@internaland free to change in any release:FileWatcher,LeafLatteExtension(the globals it injects are public under point 4, the class is not),Localization\LocaleCodeandContent\SlugTitle.
- Internal, marked
- Platforms: PHP
^8.4andzephyrus-framework/core^3.17on the Composer tier. The PHP floor can rise in a minor release, announced in the changelog, never in a patch; Composer then keeps a site on the last 1.x release its PHP can run. The binary runs thephpon yourPATH; the versions of the PHP libraries it embeds are not public.
Not covered
- The exact HTML that Markdown produces: an update of CommonMark can change a detail.
- The order of the entries of
search.json. - Everything listed as not public or internal above.
Security fixes
A security fix can tighten a refusal or change an output in a minor or patch release, when that behaviour was itself the flaw. The changelog names it.
Upgrading from 0.1.x
- Composer tier: require
"zephyrus-framework/leaf-core": "^1.0"(Composer does not move a^0.1constraint to 1.0 by itself). A project created withcomposer create-projectorleaf ejectbefore 1.0 requires"@dev": change it to"^1.0", remove"minimum-stability": "dev", then runcomposer update zephyrus-framework/leaf-core. - Binary tier: set
LEAF_VERSIONtov1.0.0and, with it, the expected SHA-256: theleaf-linux-amd64line of the release'schecksums.txt. - Front matter is now always read as YAML 1.2:
yes,no,onandoffare strings. Writetrueorfalse. - A locale listed twice in
localization.supported_locales, in any case (enandEN), stops the build: remove the duplicate. - Tailwind: a template or a Markdown page of your site that uses a class the theme's stylesheet lacks loses its style. See Styling a page.
- Theme overrides: take over the changes the theme's changelog lists for each file you override.
The full guide, for both tiers, is UPGRADE.md. Each release is described in the changelogs of leaf-core and of the theme.