015: Markdown blog
A full blog built on a markdown collection. Each .md file becomes a route. The index page lists every post. Each post page renders the markdown body.
What this demonstrates
- A declarative collection page (
p-collection="blog"). piko.GetAllCollectionItemsfor the index page.<piko:content />for rendering the markdown body as HTML.
Project structure
src/
pages/
index.pk Listing page for all posts.
blog/
{slug}.pk Individual post page (declarative collection).
content/
blog/
*.md Post source files.
partials/
layout.pk Shared site layout.
How to run this example
From the Piko repository root:
cd examples/scenarios/015_markdown_blog/src/
go mod tidy
air