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 git+https://github.com/liang2kl/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
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.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 55150b07580dfd54ebf91f219a4181dfdd19780df2717ba3d6d20107cd04abeb |
|
MD5 | ed4da09f5c42417d13583166dc074b76 |
|
BLAKE2b-256 | 3027565fd25fadb0fa931217d66f96080d560840497832153649eae91d0ee7f3 |
Hashes for mkdocs_blogging_plugin-0.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ca66c8b7b36387df1f1a6ecd8d6fe5d412b122e77cedb349dd3f85567e20f476 |
|
MD5 | 6782b57bd34d9bc4851f589cda640c42 |
|
BLAKE2b-256 | aa19a7da8b9b5c5978fa58cf9b7f1a3f5c157f41d658d731273ba48a38364e14 |