pelican-plugins / injector Goto Github PK
View Code? Open in Web Editor NEWPelican plugin to inject custom code before or after specific HTML tags, without modifying your theme.
License: MIT License
Pelican plugin to inject custom code before or after specific HTML tags, without modifying your theme.
License: MIT License
Hey @buanzo. Nice work on the follow-up changes to the Injector plugin. Following are some things I noticed upon returning to my desk and reviewing the recent developments:
fixup! [โฆ]
, those are intended to be squashed into their parent commits before the PR is merged. So what I was looking for in that case was a PR review and approval, after which I would have squashed the commits and merged the PR. Not a big deal, of course. Just something to keep in mind for the future in order to keep commit history somewhat organized and tidy.1.0.0
and a GitHub release was added manually, whereas these steps are usually handled automatically in CI via AutoPub and GitHub Actions.Regarding fixing the latter two issues, I'd like to do the following:
1.0.0
tag and GitHub release.main
as 1.0.0
on GitHub and PyPI.Any objections if I go ahead and take these remedial actions?
My initial implementation failed to inject code for outside-article tags, so I have devised this idea:
Currently, the inject_content() function is trying to insert custom code into the HTML content of articles and pages, which works great if the specified tags are found in the content. However, if a tag is not found in the content (which may be the case for tags that are part of the theme template, such as ), the injection fails as the tag is not found.
To handle these cases, we could make inject_content() keep track of failed injections and return a list of them. Then, we could connect a new function to the content_written signal, which is triggered after an article or page has been written to disk, and perform the injection at that time.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.