Skip to content

chaos-bodensee/lektor-html-pretify

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

html-pretify

PyPI version Downloads Linting 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 pipe it through Beautiful Soup, after opening the files via codecs.

Installation

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

Python3

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

Development

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