Skip to main content

Remove chunks of generated pages and articles with comments. For Pelican.

Project description

This is a plugin for Pelican, designed to allow you to clean (or surpress) parts of the generated site. It is intended to be used with pairs of HTML comments.

This cleaning can happen multiple times within the same file. This cleaning is applied to both articles and pages. Cleaning happens after just about every other part of Pelican has run, so this is on the (near) file output. One implication of this is your summary for acticles is generated with the (later) removed text in place.

Log messages from this plugin are prefixed with [Cleaner].

Pelican Settings

CLEANER_START_MARKER = “<!– CLEANER_START –>”

Marker of where to start cleaning from. Must have a matching end marker; c.f. CLEANER_START_MARKER. These are fed into Python’s regex engine, so regex (rather than just plain) strings may work.

CLEANER_END_MARKER = “<!– CLEANER_END –>”

See CLEANER_BEGIN_MARKER.

CLEANER_ENCODING = “utf-8”

File encoding to use when reading files from disk.

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

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file minchin_pelican_plugins_clean_with_comments-1.0.0.tar.gz.

File metadata

File hashes

Hashes for minchin_pelican_plugins_clean_with_comments-1.0.0.tar.gz
Algorithm Hash digest
SHA256 dd9be201eeb19bff7e7ce319ed543555b804ef2834b3a49b4d11b131de7a0ece
MD5 af3095fa2cc5a5be05bc3b6afb96823c
BLAKE2b-256 d8b41fe610081fed99ac51a43a4ca40068f9c25796817981bf4867cf37314fbb

See more details on using hashes here.

File details

Details for the file minchin_pelican_plugins_clean_with_comments-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for minchin_pelican_plugins_clean_with_comments-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7cdcb66f406b5656411d1d185ccdb364136a51f3369f4ebe8e63e92d6ed09970
MD5 2b8198370d44e5fad2daf525baceccd9
BLAKE2b-256 29c9d60c1f08f43b2909fe10223ad31f2c579537d31d338579e241039f313c48

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page