"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
pluginsentry in your config file yet, you'll likely also want to add thesearchplugin. MkDocs enables it by default if there is nopluginsentry 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:
TrueorFalse
- 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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mkdocs-timetoread-plugin-0.0.4.tar.gz.
File metadata
- Download URL: mkdocs-timetoread-plugin-0.0.4.tar.gz
- Upload date:
- Size: 3.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
10135e8b901d1ffbaafb77f1130e87315ab0893bf8eb54c7de25b37410c50fcf
|
|
| MD5 |
625e44fd56fc32d1bca3d8e4262d996f
|
|
| BLAKE2b-256 |
70602f19ea32aa4b6602594384c1dc8e479072f83480cb639f9f98bbd7e50abd
|
File details
Details for the file mkdocs_timetoread_plugin-0.0.4-py3-none-any.whl.
File metadata
- Download URL: mkdocs_timetoread_plugin-0.0.4-py3-none-any.whl
- Upload date:
- Size: 4.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5e78245b044f0336053c8e81e256cb468c8383180599cd0867037712745a53f7
|
|
| MD5 |
411c8c3df944ad9ff5512ea68f34f0b4
|
|
| BLAKE2b-256 |
2846fed82aba3d215d7aca3fa09ce3e6370f17c3e52d189f5fc2ccb93f1d4ac6
|