A publish builds the site into dist/: static HTML, CSS, images and a few text files. Any static host can serve it. Splitleaf sends it to Vercel, or to a dist branch for the host you pick.
To pick the host, see Publishing.
What the build does
- Reads the page files, the content and
splitleaf.config.json. - Puts each component into the pages that use it.
- Fills the content lists and the content templates.
- Removes the Splitleaf markers. See Data attributes.
- Writes the head: title, canonical, Open Graph, hreflang and favicon links.
- When Auto compress images is on, makes AVIF versions of the images in
/assets/, and wraps each<img>in a<picture>. SVG files stay as they are. - Copies
public/to the site root. - Writes
robots.txt,sitemap.xml,_redirectsand, when you set it,llms.txt.
Draft and archived pages and items are not built. An Incomplete item does not go live.
The build output
- index.html
- about/index.htmlclean URLs: /about
- blog/summer-pop-up/index.htmlone page for each published item
- 404.html
- 404/index.html
-
styles/a new name on each change
- fonts.3a91c0de.css
- variables.8b2e4f17.css
- site.c47d9a02.css
- components.51f0b8e3.css
- assets/from public/assets/, with AVIF versions
- favicons/when you set a favicon
- opt-filter.jsonly when a page has a filter form
- _redirects
- robots.txt
- sitemap.xml
- llms.txt
- Each stylesheet name holds a hash of its content, so browsers load the new CSS after a publish.
sitemap.xmlneeds the site address. Set a primary domain on the Publishing tab._redirectsholds your redirects for hosts that read the file.- With IndexNow on, the build also writes a key file,
<key>.txt.
A staging build adds noindex, nofollow, and its robots.txt blocks every crawler.
Note: dist/ is made again on each publish. Do not edit it. Edit the source files.
Vercel
With Vercel, the App uploads dist/ to your Vercel project through the Vercel API. Vercel builds nothing. The files that Splitleaf built are the files that go live.
dist/stays out of Git. Your repository holds only the source.- The App writes a
vercel.jsonfor each upload: clean URLs, trailing slashes, redirects and language redirects. - The site folder never holds this
vercel.json. It lives in the App's cache. - When the primary domain is your own domain, the
*.vercel.appaddress getsX-Robots-Tag: noindex, nofollow.
A push to main on GitHub does not change the live site. See Git and GitHub.
Manual hosting
With Manual hosting, Splitleaf publishes to GitHub only. Each publish puts the built site on the dist branch, as one commit with no history. If your repository already has a dist branch, the App uses splitleaf-dist. The Publishing tab names the branch.
- In Site settings, click Publishing.
- Type the address of the site in Site URL.
Set up your host, for example Cloudflare Pages, Netlify or AWS:
- Connect the host to the GitHub repository of the site.
- Set the branch to the branch that the Publishing tab names, usually
dist. - Leave the build command empty.
- Set the output folder to the root of the branch.
The host then deploys on each publish. _redirects and 404.html at the root work on hosts that read them, for example Cloudflare Pages and Netlify.
Staging
Stage writes the staging branch and never the live site. A staging site is a domain for that branch on Vercel. It is optional. See Staging.
Domains
To link a domain, see Link a custom domain.