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
paging: false # Disable paging
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.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 35932c34c3fdd57e619c9f0f2994733594304aaac7a7f2cc0c8ed3531480e7e0 |
|
MD5 | b259e23d6a0c8aef288a845900164070 |
|
BLAKE2b-256 | 9c01f2ae1b9f1ca532310db084d296bd7c7a0f738a480370d6695d2fd7a84d68 |
Hashes for mkdocs_blogging_plugin-0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8f67e12ff7247ed584d2571582c7520b68f9b46889ab07ac8cd40aed3a3f4c89 |
|
MD5 | f2dafb6a68ceff7525bc42e810473e3d |
|
BLAKE2b-256 | e27f77bd55c36ac528c6c0bb87eb77f2ff1b3676cacaea3b5b98ca838e5bdc5a |