Preview while you write
The site on your computer, updated on every save.
- Command
heron serve ., then open localhost:8000.- What it does
- Rebuilds the changed pages as soon as you save a file.
- Search engines
- A preview is always closed to indexing.
Basics · 5
When you run heron build, HERON reads your site folder and writes a finished website into the dist/ folder. This page shows what happens on the way, so a strange result or an error message makes sense.
No programming here: just the path of one page from your text file to the browser, and how to read what the build tells you.
Think of a print shop. You bring the text (your .md files), the photos (media/) and a few instructions (site.yaml). The shop has a layout (the theme). It checks that nothing is missing, sets every page in the layout, resizes the photos for each format and prints the whole edition. The finished edition is the dist/ folder: plain web pages that any hosting can hand out.
The shop works the same way every time. The same folder always gives the same site, on your laptop, on GitHub and on a server.
When you need this page: when the site looks different from what you expected, or the build stops with an error. When you can skip it: while everything works.
prices.md in the folder of your language: settings at the top, then the text with sections. Markdown in 10 minutes shows how.prices.md becomes /prices/. On a site with several languages, the copy in the folder of a second language gets that language's prefix, for example /de/…. No list of pages to maintain: a new file is a new page.## headings, and each section gets its form: text, list, steps, cards, table, questions. See Section forms.dist/prices/index.html.| In your folder | In dist/ |
|---|---|
content/en/index.md | index.html, the home page |
content/en/prices.md | prices/index.html, address /prices/ |
content/de/prices.md (second language) | de/…/index.html, the address with the language prefix |
media/team.jpg | media/… copies in several widths, WebP and AVIF |
site.yaml | Name, menu and contacts on every page, sitemap.xml, robots.txt, llms.txt |
theme/ | The look: the HTML layout, assets/ with styles and scripts |
static/ | Copied as is, for files like a verification file for a search engine |
The site on your computer, updated on every save.
heron serve ., then open localhost:8000.Builds the whole site into dist/ once.
heron build .The one that goes live.
heron build . --env prod --strictAt the end HERON prints a report. A normal one ends with how many files were written:
Files written: 128 → my-site/dist
When something is wrong, HERON names the file, the line, what is wrong and what to do. An error stops the build:
E002 content/en/prices.md:3: description is empty
what to do: add a description of up to 155 characters
A warning does not stop a test build, but stops the final one:
Warnings — 2:
links — 1:
en/about.md:14: link /team/ leads nowhere
other — 1:
en/prices.md: title is longer than 60 characters (71)
How to read it:
E002) is the kind of problem. The list of codes is in If something goes wrong and in full in the build specification.dist/, in .heron-cache/warnings.txt.Fix the first error, save, build again. Often one fix clears several messages.
HERON does the work once, at build time. A visitor gets a ready file, so there is nothing to compute, no database to ask and nothing to break on the server. That is why the starter site scores 100 for performance in Lighthouse on a phone, and why a thousand pages in two languages build in a few seconds.
Photos are the slow part of the first build: every size is encoded once. HERON keeps them in a cache, so the next builds take seconds.
While you write, heron serve builds by itself on every save. The final build is needed only when you publish, and with git push GitHub runs it for you.
Check that the file is saved and is inside content/. If you look at the live site, it changes only after the final build and the upload. Then refresh the browser with Shift held down, so it does not show a cached copy.
A wrong file stops the build with a message, and the live site stays as it was. That is the point of the strict build: a broken version never goes out.
Put the folder on GitHub: Git and GitHub. The full description of the build is in Build: stages, commands, errors.