Skip to content

Releases: pelican-plugins/injector

Injector 1.0.0

13 Jul 12:35
Compare
Choose a tag to compare

We are thrilled to announce the initial release of the Injector plugin, version 1.0.0! This marks a significant milestone in the development of the plugin, offering code injection capabilities for your Pelican web sites.

Key Features in Version 1.0.0

Code Injection: With the Injector plugin, you can now easily inject code into specific HTML tags within your articles and pages. Customize your web site’s behavior by specifying the tag, code, and injection position using the INJECTOR_ITEMS setting in your Pelican configuration.

Powerful HTML Parsing: Leveraging the widely-used and beloved BeautifulSoup library, the Injector plugin ensures precise and reliable code injection, providing you with a seamless experience.

Enhanced Control: Enjoy granular control over the injection process. You can enable code injection for articles and pages, and we have plans to introduce further enhancements such as custom writers and filename/path regex matching in future releases.

Example Usage:

# pelicanconf.py

# Enable code injection in articles
INJECTOR_IN_ARTICLES = True

# Enable code injection in pages
INJECTOR_IN_PAGES = True

# Specify injection items
INJECTOR_ITEMS = [
    ('head', '<script>console.log("Hello, world of 42!");</script>'),
    ('body', '<style>.custom-style { color: red; }</style>', 'before'),
    # Add more injection items as needed - See README.md
]

We invite you to explore the possibilities that the Injector plugin offers and utilize it to enhance the functionality and customization of your Pelican-powered sites.

For further updates, stay tuned to the repository and feel free to contribute or report any issues you encounter.

Thank you for your valuable support, and we are excited to see how the Injector plugin transforms your Pelican-powered sites!

Happy coding,

The Injector Team