The post layout is designed for full blog posts. It renders a large hero image, post metadata, optional embedded video, tag links, an optional table of contents, and related posts.
To use the Post layout in your Jekyll site, create a post with the following front matter:
---
layout: post
title: My Post
description: A short summary of the post
---
The Post layout accepts these commonly used parameters in front matter:
| Parameter | Default | Description |
|---|---|---|
layout |
Required | Must be set to post |
title |
Required | Post title shown in the hero section |
description |
None | Short summary shown below the title |
image |
site.image or /assets/img/default.png |
Hero image for the post |
author |
site.github.owner.name or login |
Display name in post metadata |
date |
Filename date | Publication date shown in the header |
video |
None | Optional embed URL rendered above the content |
toc |
false unless set |
Shows a table of contents when headings are present |
tags |
None | Tag list rendered below the content when tag pages are enabled |
related_by |
site.related_by |
Controls related-post matching |
related_limit |
site.related_limit or 3 |
Maximum number of related posts |
related_template |
post-card.html |
Include used to render related posts |
page.video.site.tag_page_dir is configured.toc: true and the content contains headings.---
layout: post
title: Building a theme site
description: Notes from setting up a theme-based Jekyll project
image: /media/cover.jpg
author: Primer Pages
toc: true
tags: [jekyll, theme]
related_by: "tags or categories"
---
toc is enabled and the post has headings.