Post
Layout for date-based content, such as blog posts or news items.
Note:
View an example page that uses this layout (opens in a new tab)
To use this layout, make post the value for a page’s layout front matter option:
layout: post
title: Page title
Page content
Showing previous and next posts
To link posts in a series, add showPagination: true to the post’s front matter options. This adds previous and next links to the bottom of the page.
Posts get ordered by title. To set a specific order, use the order front matter option:
layout: post
title: Second post title
order: 2
This is the second post
Front matter options
In addition to common front matter options, this layout accepts the following options:
| Name | Type | Description |
|---|---|---|
| author | string, object or array | Author name, or author object. Also accepts an array of author objects. |
| date | string | Date post was published (in ISO 8601 format) |
| image | object | Image shown above post content. See options for image. |
| modified | string | Date post was updated (in ISO 8601 format) |
| showPagination | boolean | Show previous/next pagination links at the foot of the page |
| tags | array | List of tags post relates to |
Options for author object
| Name | Type | Description |
|---|---|---|
| author.name | string | Name of post author |
| author.url | string | URL for website of post author |
Options for image object
| Name | Type | Description |
|---|---|---|
| src | string | Path to post image |
| alt | string | Alternative text for post image |
| caption | string | Caption shown below post image |
| opengraphImage | boolean | Whether image should also be used as the page’s Open Graph share image |