Mkdocs plugin that generates a blog index page sorted by creation date.
Project description
mkdocs-blogging-plugin
A mkdocs plugin that generates a blog page listing selected pages by time.
Installation
pip3 install mkdocs-blogging-plugin
Prerequisites
-
Only
material
theme is adapted by far. -
navigation.instant
feature cannot be enabled if blog paging is on.
Usage
Add blogging
in plugins
and specify the directories to be included:
plugins:
- blogging:
dirs: # The directories to be included
- blog
In the page you want to insert the blog content, just add a line {{ blog_content }}
into your desired position:
# Blogs
{{ blog_content }}
In articles, add meta tags providing article title and description, which will appear on the post list:
---
title: Lorem ipsum dolor sit amet
description: Nullam urna elit, malesuada eget finibus ut, ac tortor.
---
To exclude certain pages from the blog collection, add a meta tag exculde_from_blog
in the meta section in the markdown file:
---
exculde_from_blog: true
---
And it's done! You can open the page where you insert {{ blog_content }}
and see how it is working.
Customization
Optionally, you can customize some behaviours of the plugin:
size: 5 # Number of articles in one page, default: 10
locale: en # The locale for time localizations, default: system's locale
sort:
from: new # Sort from new to old, default
# or old # Sort from old to new
by: creation # Sort by the first commit time, default
# or revision # Sort by the latest commit time
paging: false # Disable paging
show_total: false # Remove 'total pages' label
Credits
Inspired by mkdocs-git-revision-date-localized-plugin and mkdocs-material-blog.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for mkdocs-blogging-plugin-0.1.3.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4d7dbc06bb7039758a05ff05822780b395c8b7add22a3e6fce7f0c1f385d931a |
|
MD5 | d1f397c85bb42f2af7b71e5b7620f1d8 |
|
BLAKE2b-256 | e0303e405ae5617064566486338f5c946bb9d348ef1b55e6ba27b544e3b519b0 |
Hashes for mkdocs_blogging_plugin-0.1.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d3acd3c5a097d25fa5a8e866831fa1660bfd58894988fe2f1e95ea0cc88be1bc |
|
MD5 | 4d05df474995481fe8e30f157ff7e4ef |
|
BLAKE2b-256 | 5bd1830a99b71c1af909e60d8b380e16bcdda79d42bc11665cc91499ef9008a3 |