Write
Addresses
Every page is published at an address made from where its file is in
content/, unless you choose another.
How a file’s address is made
| File | Address |
|---|---|
content/index.md |
/ |
content/post-1.md |
/post-1/ |
content/posts/index.md |
/posts/ |
content/posts/post-1.md |
/posts/post-1/ |
content/posts/2026-10-04-post-1.md |
/posts/post-1/ |
content/days/03-day-one.md, in a numbered folder |
/days/day-one/ |
content/Café.md |
/cafe/ |
content/posts/file-1.pdf |
/posts/file-1.pdf |
Unless its permalink names a file, each address is a folder holding an
index.html: /posts/post-1/ is written as posts/post-1/index.html.
A folder’s own page
content/post-1/index.md
content/post-1/file-1.pdf
A folder’s index.md is published at the folder’s address. Where it is
the folder’s only page, the other files travel with it: the file is at
/post-1/file-1.pdf, and the page links to it as
[the file](file-1.pdf).
The name in the address
The name in the address is the file’s name in lower case, its words joined by hyphens:
- A date it opens with is taken off:
2026-10-04-post-1.mdgivespost-1. - Accents on Latin letters are dropped:
Café.mdgivescafe. Letters of other scripts are kept as they are. - In a numbered folder, the number it opens with is taken off.
A numbered folder
| File | Address |
|---|---|
content/days/01-day-one.md |
/days/day-one/ |
content/days/02-day-two.md |
/days/day-two/ |
content/days/03-day-three.md |
/days/day-three/ |
A folder is numbered where every page in it opens its name with a number and a hyphen. The numbers give the folder’s order and are left out of the addresses, so renumbering a page never moves it.
Where the numbers are part of the names, write numbered: false in the
folder’s index.md, and the addresses keep them.
Choose an address with permalink
permalink: /about/
permalink publishes the page at the address it names, from the top of
the site. It may be a pattern, filled in for each page from these
pieces:
| Piece | What it gives | For content/posts/2026-10-04-post-1.md |
|---|---|---|
{year}, {month}, {day} |
The page’s date | 2026, 10, 04 |
{slug} |
The name in the address, made as above | post-1 |
{name} |
The file’s name exactly as written, without its ending | 2026-10-04-post-1 |
{folder} |
The name of the folder the page is in | posts |
A pattern is most useful handed down. In content/posts/index.md:
---
title: Posts
pages.permalink: /{year}/{month}/{slug}/
---
This publishes content/posts/post-1.md, dated 4 October 2026, at
/2026/10/post-1/.
- A folder’s own page stays at its folder’s address. To move it,
rename the folder. A folder holding only an
index.mdis one page, and itspermalinkmoves it. - On a site in several languages, a pattern is read from the folder of the page’s language: see addresses in each language.
A site in a folder of its domain
In statac.yaml:
url: https://example.org/blog/
Where the site’s url has a path, every page’s address starts with it:
page.url for content/post-1.md is /blog/post-1/. An address you
write starting with / then means one of two places:
| Written as | A leading / is |
So /post-1/ leads to |
|---|---|---|
permalink, redirect_from or redirect_to |
the top of the site | /blog/post-1/ |
@url(/post-1/) in the writing, {{ url("/post-1/") }} in a template |
the top of the site | /blog/post-1/ |
A Markdown picture whose file Statac finds,  |
the top of the site | the picture, under /blog/ |
A plain link, in the writing or a template, [Post 1](/post-1/) |
the top of the domain | /post-1/, outside the site |
Warning:
Statac never changes where a link you wrote leads, so a plain link
written from the top leads outside a site under a path. Write
@url(/post-1/) in its place, as
links inside the site describes.
For one run at another address, see a preview at another address.
Old addresses and redirects
Keep an old address working
redirect_from: [/2025/post-1/, /old/post-1/]
At each address redirect_from lists, Statac publishes a small page,
built with templates/redirect.html, that sends the reader on to the
page.
Send readers on
---
title: Post 1
redirect_to: /posts/post-1/
---
A page with redirect_to publishes the same small page at its own
address, and nothing else.
redirect_to names |
What Statac does |
|---|---|
An address on the site, from the top, which may end with # and a place on the page |
Sends readers there. |
A whole address elsewhere, such as https://example.org/post-1/ |
Sends readers there. |
| Another redirect | Follows it, and sends readers straight to where they end up. |
A dated name keeps its date in the address of a page sending readers
on: content/2019-05-01-post-1.md is published at
/2019-05-01-post-1/, not /post-1/, unless its permalink says
otherwise.
A folder’s index.md, or a page at a tag’s address, with redirect_to
leaves its redirect at the list’s address. No list pages are made there,
and the list has no feed.
What a redirect page reads
A page with redirect_to is no post. It is in no list, feed or
site.pages. It reads title, date, permalink, draft, needs,
redirect_from, order and numbered, and fields of your own. Writing
under its front matter is never published.
templates/redirect.html builds the small page for both. It is handed:
| Name | What it holds |
|---|---|
to |
Where readers are sent. Whole, as https://example.org/posts/post-1/, where it is on the site and the site has a url. |
title |
The title of the page writing the redirect; or else what headline calls the page published at to; or else to. |
page |
The page writing the redirect. |
A redirect template can be this short:
<!doctype html>
<meta charset="utf-8">
<title>{{ title }}</title>
<meta name="robots" content="noindex">
<meta http-equiv="refresh" content="0; url={{ to }}">
<link rel="canonical" href="{{ to }}">
<p>This page has moved to <a href="{{ to }}">{{ to }}</a>.</p>
noindex asks search engines to leave the small page out, and the
canonical line names the page to show in its place.
What is published as it is
In content/ |
Published |
|---|---|
| A page | As HTML, at its address. |
A file that isn’t a page or a picture, such as posts/file-1.pdf |
As it is, at the same place: /posts/file-1.pdf. |
| A photograph a page shows: a JPEG, or a PNG or WebP that doesn’t move | As copies in several sizes, beside where it would be. The file itself too, where a page links to it. |
| A photograph a page only links to, or that no page shows or links | The file itself, at the same place. |
A photograph with optimise: false |
The file itself, with no copies: see leaving a photograph as it is. |
| A PNG or WebP that moves | The file itself, with no copies. |
| Any other picture, such as a GIF, an SVG or an AVIF | As it is. |
A picture’s description file, such as photo-1.jpg.yaml |
Never. |
A hidden file, whose name starts with a dot, and the names in left_behind |
Never. |
A photograph’s copies carry nothing of where or when it was taken, or what took it; the file itself, where it is published, does: see the photograph itself.
A file that must travel untouched goes in static/.
Where next?
- Lists, tags and series: numbered folders, tag pages, and where a list’s later pages go
- Writing: links, and
@urlfor links inside the site - Pictures: a photograph’s copies, and leaving one as it is
- Building and publishing: building the site, and a preview at another address
Something unclear or wrong? Open an issue on GitHub.