Post

A crown icon above the words GOV.UK.
The GOV.UK logo

Use front matter options to customise the appearance, content and behaviour of this layout.

For example, this page has the following options:

layout: post
order: 3
title: Post
description: Layout for date-based content, such as blog posts or news items.
date: 2011-12-21
modified: 2012-12-22
image:
  src: /assets/images/govuk-opengraph-image.png
  alt: A crown icon above the words GOV.UK.
  caption: The GOV.UK logo
authors:
  - name: William Ewart Gladstone
    url: https://www.gov.uk/government/history/past-prime-ministers/william-ewart-gladstone
  - name: Benjamin Disraeli
    url: https://www.gov.uk/government/history/past-prime-ministers/benjamin-disraeli-the-earl-of-beaconsfield
aside:
  title: Aside
  content: | 
    A small portion of content that is **indirectly** related to the main content.
related:
  sections:
    - title: Related links
      items:
        - text: Layouts
          href: ../../layouts
        - text: Options
          href: ../../options
      subsections:
        - title: Eleventy documentation
          items:
          - text: Front matter data
            href: https://www.11ty.dev/docs/data-frontmatter/
tags:
  - example tag
Common front matter options
Use these options to customise the appearance, content and behaviour of any layout.
Name Type Description
layout string Page layout.
includeInBreadcrumbs boolean Include page as the last item in any breadcrumbs. Default is false.
order number Ranking of page in navigation. Lower numbers appear before pages with a higher number.
title string Page title.
description string Page description.
opengraphImage object Open Graph image that appears on social media networks.
opengraphImage.src string Path to Open Graph image. Can be a relative or absolute URL. This value overrides opengraphImageUrl in plugin options.
opengraphImage.alt string Alternative text for Open Graph image.
aside object Small portion of content that is indirectly related to the main content.
aside.title string Title for aside.
aside.content string Content for aside. Accepts Markdown.
related object Related links. See related.

With one section:

Name Type Description
title string Title for group of related links. Default is 'Related content'.
items array See items.
subsections array Title for sub-group of related links.
subsections.title string
subsections.items array See items.

With multiple sections:

Name Type Description
sections array See items.

Options for items

Name Type Description
text string Title of related content.
href string Link for the related content.

In addition to the common front matter options, this layout also accepts the following options:

Name Type Description
author string or object Post author.
author.name string Name of post author. Overrides any single value given for author.
author.url string URL for website of post author.
authors array Post authors. Overrides any value(s) given for author.
authors.name string Name of post author.
authors.url string URL for website of post author.
date string Date post was published. Use ISO 8601 format, for example 2023-06-03.
image object Image shown above post content.
image.src string Path to post image.
image.alt string Alternative text for post image.
image.caption string Caption shown below post image.
image.opengraphImage boolean Whether image should also be used as the page’s Open Graph share image.
modified string Date post was updated. Use ISO 8601 format, for example 2023-06-03.
tags Array List of tags post relates to