Lektor plugin to pretify the HTML DOM using Beautiful Soup.
- It uses Beautiful Soup.
- It looks for rendered
.html
files and pipe it through Beautiful Soup, after opening the files via codecs.
You can install the plugin with Lektor's installer:
lektor plugins add lektor-html-pretify
Or by hand, adding the plugin to the packages section in your lektorproject file:
[packages]
lektor-html-pretify = 2.0.0
It is highly recommended to use this plugin with a python3 version of lektor.
Since lektor can be used as a python module it is possible to enforce this (after lektor is installed eg. with pip3 install --user --upgrade lektor
) with the following command:
# run a python3 lektor server
python3 -m lektor server
To test and/or develop on this plugin in your running lektor installation, simply place it in the packages/
Folder and have a look at the Lektor Docs