Blog post template
This is a template file for blog posts in MkDocs.
In order to keep it simple to create new posts, the template file should have the following:
Page configuration¶
When creating a new blog post, determine the following page configuration options:
- the page
title - the page
description(optional) - the page
icon(optional) - the page
status(optional) - the page
subtitle(optional) - the page
template(optional)
Page metadata¶
When creating a new blog post, determine the following page metadata:
- the post
draftoption- if set to
truethe page will not be rendered when published to GitHub Pages
- if set to
- the post
date- can be just
date: 2025-02-18 - can also include date created and date updated
- can be just
- the post
authors - the post
categories - the post
slug - the post
tags - the post
links
Excerpt¶
An excerpt can be created by adding a <!-- more --> separator after the first few paragraphs of a post.
Putting it all together¶
Front-matter¶
The front-matter consists of YAML Style Meta-Data to define the page configuration settings:
---
# page configuration
title: Blog post template
description: >
This is a template file for blog posts in MkDocs.
# icon: octicons/repo-template-24
# https://squidfunk.github.io/mkdocs-material/reference#setting-the-page-icon
status: new
# page metadata
draft: true
date:
created: 2025-02-18
updated: 2025-02-18
authors:
- rwaight
categories:
- MkDocs
slug: blog-post-template
tags:
- MkDocs
- Template
links:
# All relative links are resolved from the docs directory.
- references/index.md
- resources/index.md
---
Example section¶
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et euismod nulla. Curabitur feugiat, tortor non consequat finibus, justo purus auctor massa, nec semper lorem quam in massa.