Content that fills itself in
Articles
Copy page
An article is the second kind of thing a site holds. A page is part of the site’s shape — Home, About, Services, Contact. An article is something that arrives: a blog post, a news item, a case study, a recipe.
Which one is it
One question decides it.
Would a visitor look for it in the nav, or in a list? In the nav, it is a page. In a list, newest first, it is an article.
You will not get this badly wrong, and nothing is stuck: an article and a page are the same document underneath, with the same editor, the same settings and the same revisions.
Where articles live
Every article sits under one address — the slug of the articles collection
your site was born with:
Articles /articles/a-year-of-sourdough
Change it to blog and every article moves to /blog/… together, each one
leaving a redirect behind at the next Publish. Leave it empty and articles sit
at the root, /a-year-of-sourdough, competing with your pages for an address.
An article belongs to nothing
This is the part worth reading twice, because it is what makes articles simpler than they look.
An article is not inside anything. No page owns it. The page that lists your articles is an ordinary page with a loop on it — rename it, move it, delete it, and not one article moves.
That means:
- there can be no listing page, one, or three — your homepage
showing the latest four,
/blogshowing all of them, and a page that shows three; - an article’s address never changes because a page changed;
- there is nothing to choose when you create one. Open Articles in the rail, press New item, and write it.
Listing them
{% assign posts = collections.articles | sort: "date" | reverse %}
{% for post in posts limit: 6 %}
<a href="{{ post.url }}">{{ post.title }}</a>
{% endfor %}
Sorted by date, newest first, because the list otherwise comes in the order you arrange the articles in. No filter, because there is nothing to filter by. See A blog index for the whole thing with a card.
Pages still nest
Articles being flat does not change pages. A Services page with Roofing and
Gutters inside it is still a page and its children, still addressed
/services/roofing, and still listed with
where: "parent", "services". That is the right shape for a section of the
site — part of its structure, in a deliberate order.
Use a section for what belongs to the site’s shape, and articles for what arrives.
What you get either way
Both kinds get addresses, redirects when you rename one, drafts and Publish, the trash, publish history, metadata, pictures and a featured image. Nothing is missing from an article that a page has, except the two things about structure: it never sits under a page, and it cannot be your homepage. Articles can sit under one another only if you switch on Hierarchical for the collection, which a blog rarely wants.