Lektor Plugin to pretify your HTML DOM using BeautifulSoup
Project description
html-pretify
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 = 1.0.7
Usage
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
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 with new generated css
python3 -m lektor server -f pretifyhtml
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
Project details
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
File details
Details for the file lektor-html-pretify-1.0.7.tar.gz
.
File metadata
- Download URL: lektor-html-pretify-1.0.7.tar.gz
- Upload date:
- Size: 3.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | af0de287680e9547b5af2b62a3998f59572917514f5d0c99badb5d49ca037497 |
|
MD5 | 612911b518b605a90e9b2bce9fa8e3fe |
|
BLAKE2b-256 | 838f68abdd732d64f8dca2f35e6782cf3370a8af0508e1b8b0b7fcfe3f288f1a |
File details
Details for the file lektor_html_pretify-1.0.7-py3-none-any.whl
.
File metadata
- Download URL: lektor_html_pretify-1.0.7-py3-none-any.whl
- Upload date:
- Size: 4.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f2aeb9ddb57cdb9163c8e9098f68c121f9bcbdbb14562c80f2256101587d233f |
|
MD5 | 93e3cfa86bc162e269c94f041ac12800 |
|
BLAKE2b-256 | c1ea20854dece2509d2854af70de940230f9922ab09cbec4a2632e36569461c1 |