Statac

Write the first page

Write an About page in Markdown, and see how Statac publishes a page before the site has any templates.

A page is a Markdown file in content/. Ailsa’s About page is the site’s first.

Write it

In content/about.md:

---
title: About
---
I'm Ailsa. I walk in the hills most weekends, mostly in the Southern
Highlands, and write up each walk here: the route, how long it took,
and whatever the weather did.

The lines between the two --- lines are the page’s front matter: here, only its title. Everything below them is the page’s content, written in Markdown.

Save the file. In the terminal, statac serve builds the site again:

`content/about.md` changed. Built 1 of 1 file in 0.00 seconds. Told the browser to reload.
Started `published.txt` with the 1 URL this site publishes, so a later build can say when one is no longer published. Commit it with the site.

note  Built without template: Statac publishes 1 page as its content alone
  While building: content/about.md
  Add `templates/page.html` to build it with a template.
  More: https://statac.dev/e/built-without-template/

See it

The list in the browser now has the About page, at /about/. Statac makes a page’s URL from its file’s name: content/about.md is published at /about/. See URLs.

Open it. The page is the paragraph you wrote and nothing else: no title, no styles, only the browser’s own plain text. The note says why. The site has no template to build the page with, so Statac publishes the page’s content alone.

The debug panel

In the bottom left corner of the page is a small tab. statac serve adds it to every page it shows, and its ring counts the note. Click the tab, or press Alt+Shift+S (Option+Shift+S on a Mac), to open the debug panel. Its Problems tab shows the same note, with what it means and how to act on it.

Keep the debug panel in mind: in the next part it shows every value a template can use on the page. See the debug panel.

Next

In part 3, you add the template the note asks for, and a stylesheet.

Something unclear or wrong? Open an issue.