Statac

Problems explained

Unusable address

error An error stops the build: nothing is published until it is fixed.

An address can’t be written to disk, or a permalink pattern can’t make one. A name in an address can’t hold < > : " | ? * \ % # or a control character, can’t end with a space or a dot, and can’t be ., .. or a name Windows keeps for a device, such as con. Statac holds every site to these rules, so a site that builds on one computer builds on all of them.

A pattern may ask for {year}, {month}, {day}, {folder} and {name}, and for {slug}, the page’s own name made ready for an address. The pieces of a date need a page with a date. The pattern of a page with each: may also ask for any field of the items or posts it makes pages for, such as {key} or {isbn}, and each item or post needs the fields it asks for.

What you’ll see

error  Unusable address: there is no piece `{yaer}`
  Did you mean `{year}`?
  More: https://statac.dev/e/unusable-address/

In the terminal the message also names the file and line where there is one, and marks the exact text.

Why Statac stops

A page that can’t be written, or that lands somewhere you didn’t mean, would be missing from the site or at the wrong address.

How to fix it

Do what the message suggests: take out the character, correct the piece’s name, or give the page a date.

Example

In content/notes/index.md:

---
pages.permalink: /notes/{yaer}/{name}/
---

The piece is called {year}:

---
pages.permalink: /notes/{year}/{name}/
---

Its name

Nameunusable-address
In the terminalstatac explain unusable-address
To stop showing itIt stops the build, so it can't be quietened.

Something unclear or wrong? Open an issue on GitHub.