Create the blog pages
Create the post, category, listing, and search pages your blog is served on.
The blog app stores posts but doesn't create pages for them. You create the pages yourself, like any other page on your site, and each one uses a blog section with a blog loader. A typical blog has four:
| Page | Example path | Shows |
|---|---|---|
| Post | /:slug | A single post, chosen by the slug in the URL. |
| Category | /topics/:category* | The posts in a category and its subcategories. |
| Listing | / or /blog | The latest posts, with pagination. |
| Search | /s | Posts matching the ?q= search term. |
The paths are up to you. Whatever you pick, the post page's path must match the app's Page Slug, and the category page's path must match its Category Slug. See Install the blog app.
Start from the template sections
The blog-tanstack template has a ready-made section for each page in src/sections/Blog/. Copy the ones you need into your site and restyle them:
| Section | Used on | What it does |
|---|---|---|
BlogPostSection.tsx | Post page | Renders the post: cover, authors, a table of contents, the post blocks, and related posts. |
BlogHome.tsx | Listing and category pages | A paginated grid of posts. |
BlogSearch.tsx | Search page | A search field and its results. |
BlogTopics.tsx, BlogAuthors.tsx | Optional index pages | All categories, or all authors. |
BlogHeader.tsx | Every page | The blog's header, with search and a reading progress bar. |
The template's pages are in .deco/blocks/pages-blog-*.json if you want to copy their configuration too.
Create each page
Create the pages in the Site Editor (see Pages) or as page blocks in code. For each one, set the path, add the section, and connect its loader:
- Post page: add the post section and set its post to the
BlogPostPageloader, with the slug read from the URL. For search engines, use theSeoBlogPostSEO section with the same loader. - Category page: add the listing section with the
BlogpostListingloader (orBlogpostListfiltered by category), reading the category from the URL. Use theSeoBlogPostListingSEO section. - Listing page: add the listing section with the
BlogpostListloader, sorted by newest first. - Search page: add the search section with
BlogpostListorBlogpostListing. Both read the search term from?q=in the URL and match titles, excerpts, and content. Mark the page as hidden from search engines.
In code, the post page looks like this. The slug comes from the :slug part of the path:
{
"name": "Blog Post",
"path": "/:slug",
"__resolveType": "website/pages/Page.tsx",
"sections": [
{
"__resolveType": "site/sections/Blog/BlogPostSection.tsx",
"page": {
"__resolveType": "blog/loaders/BlogPostPage.ts",
"slug": { "__resolveType": "website/functions/requestToParam.ts", "param": "slug" }
}
}
],
"seo": {
"__resolveType": "blog/sections/Seo/SeoBlogPost.tsx",
"jsonLD": {
"__resolveType": "blog/loaders/BlogPostPage.ts",
"slug": { "__resolveType": "website/functions/requestToParam.ts", "param": "slug" }
}
}
}Only published posts, and scheduled posts whose go-live time has passed, appear on these pages. The developer reference lists every loader and its options.
Check the pages
- Publish the pages with Review & Publish.
- Open a post in Content → Blog → Posts and select See preview. It should open your post page.
- Do the same from a category with See category preview.
If a preview opens the wrong address, compare the page paths with the app's Page Slug and Category Slug.
Implementation reference: blog-tanstack template. Reviewed 2026-10-09.