PyPI version
Linting Python package
Upload Python Package
Yamllint GitHub Actions

Lektor plugin to pretify the HTML DOM using Beautiful Soup.

How does it actually work?

  • It uses Beautiful Soup.
  • It looks for rendered .html files and pretify themi.


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:

lektor-html-pretify = 1.0.5


To enable the plugin, pass the pretifyhtml flag when starting the development
server or when running a build:

# build and compile css from scss
lektor build -f pretifyhtml

# edit site with new generated css
lektor server -f pretifyhtml


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 with new generated css
python3 -m lektor server -f pretifyhtml


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


View Github