"Estimated Time To Read" generator for MkDocs
Project description
mkdocs-timetoread-plugin
mkdocs-timetoread-plugin is a lightweight 'estimated time to read' generator for MkDocs inspired by @alanhamlett's readtime and Medium's read time formula.
Setup
Install the plugin using pip:
pip install mkdocs-timetoread-plugin
Activate the plugin in mkdocs.yml
:
plugins:
- search
- timetoread
Note: If you have no
plugins
entry in your config file yet, you'll likely also want to add thesearch
plugin. MkDocs enables it by default if there is noplugins
entry set, but now you have to enable it explicitly.
mkdocs.yml Configuration
-
wpm
- Sets the 'words per minute' value for calculating estimated read time.- Default value is
255
- Possible value range:
1
-999
- Default value is
-
allPages
- Sets all markdown files to have their read times' calculated unless explicitly disabled in the files' Front Matter.- Default value is
True
- Possible values:
True
orFalse
- Default value is
-
textColor
- Sets the CSS color for styling the 'Estimated read time:' text.- Default value is
bdbdbd
- Possible value range:
000000
-ffffff
- Default value is
Example Configuration
plugins:
- timetoread:
wpm: 190
allPages: True
textColour: 000000
Front Matter
Other configuration options are available by defining the following in a YAML front matter block in each markdown file.
// Disable timetoread on a per file basis if `allPages is set to True
timetoread: False
// Enable timetoread on a per file basis if `allPages` is set to False
timetoread: True
Usage
Once activated mkdocs-timetoread-plugin
will automatically add a new line, with the estimated time to read the document, after the </h1>
tag in the HTML output generated by MkDocs.
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-timetoread-plugin-0.0.3.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4159d4dd45444983d0d01198af337f0a3062697134d79e64b85cb7979134690e |
|
MD5 | c6a9f13be8d19bfe76cb38e6a51e434d |
|
BLAKE2b-256 | 14684c30d6b04fc326ad737bfec95281b4a65a71ced6a646bdc8937d1ebe5960 |
Hashes for mkdocs_timetoread_plugin-0.0.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | aff5d71026c805240e0b7bb0287352218066e6d757b9bef7f175e45557d4af73 |
|
MD5 | e0ba8626a1b96da9ad7c30ba55c83ea8 |
|
BLAKE2b-256 | 3a851225376d5572e0bf15ba6e01d342d899afb2184d930518fe8fa44b7ed3e4 |