Statac

Problems explained

Writing not published

warning A warning says what Statac did instead, and the build goes on.

A page with redirect_to has writing after its front matter. A page that sends readers on publishes only the redirect, so the writing doesn’t appear anywhere.

What you’ll see

warning  Writing not published: `content/post-1.md` sends readers on
  Move it to where readers are sent, or take out `redirect_to` to publish it.
  More: https://statac.dev/e/writing-not-published/

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

Why Statac warns

Statac is sure the redirect is intended, because redirect_to says so. It publishes the redirect and tells you, because writing that is never published may be writing you want to keep.

How to fix it

Move the writing to the page readers are sent to, and leave only front matter on the page that sends them on. If the page should be published here after all, remove redirect_to.

Example

In content/post-1.md:

---
redirect_to: /posts/post-1/
---
The first post.

With the writing moved to content/posts/post-1.md:

---
redirect_to: /posts/post-1/
---

Its name

Namewriting-not-published
In the terminalstatac explain writing-not-published
To stop showing itquiet: [writing-not-published] in statac.yaml, once you have understood it. Statac still counts it.

Something unclear or wrong? Open an issue on GitHub.