Coder Social home page Coder Social logo

injector's People

Contributors

botpub avatar buanzo avatar justinmayer avatar pre-commit-ci[bot] avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

injector's Issues

Publish package to PyPI

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:

  • #1 was merged before it was fully ready. When you see commits prefixed by 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.
  • There is (another) copy+paste fail in the badge links in the README.
  • The contents of #1 were manually tagged with 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:

  • Fix the README badge links.
  • Remove the 1.0.0 tag and GitHub release.
  • Use AutoPub to publish the contents of current main as 1.0.0 on GitHub and PyPI.

Any objections if I go ahead and take these remedial actions?

Add support for top-level tags like head

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.