Skip to content

Kirby 6.0.1

Blog

A simple blog and articles setup

Blog

/site/blueprints/pages/blog.yml
title: Blog
icon: 📚

columns:
  left:
    width: 1/2
    fields:
      drafts:
        extends: fields/articles
        label: Drafts
        status: draft

      unlisted:
        extends: fields/articles
        label: In Review
        status: unlisted

  right:
    width: 1/2
    fields:
      listed:
        extends: fields/articles
        label: Published
        status: listed

Predefined field for reusage

/site/blueprints/fields/articles.yml
type: pagelist
label: Articles
info: "{{ page.date.toDate('d.m.Y') }}"
template: article
empty: No articles yet
sortBy: date desc

Result

Single article

/site/blueprints/pages/article.yml
title: Article
num: '{{ page.date.toDate("Ymd") }}'
icon: 📖

status:
  draft:
    label: Draft
    text: The article is still in draft mode. It can only be seen by editors with panel access.
  unlisted:
    label: In Review
    text: The article is online and can be visited with the direct URL. The team must still give the final go to publish it.
  listed:
    label: Published
    text: The article is online and listed in the blog

columns:
  main:
    width: 2/3
    fields:
      text:
        type: textarea
        size: large

  sidebar:
    width: 1/3
    # here we add meta fields and a `filelist` field to upload files we can select from in the heroImage field
    fields:
      heroImage:
        type: filepicker
        max: 1
      date:
        type: date
        time: true
        default: now
      author:
        type: userpicker
      tags:
        type: tags
      files:
        type: filelist

Result

Cookbook

If you want to find out more about creating a Kirby-powered blog, read our full cookbook recipe.