pelican-plugins / linkclass Goto Github PK
View Code? Open in Web Editor NEWPelican plugin to set anchor tag's class attribute to differentiate between internal and external links
License: GNU Affero General Public License v3.0
Pelican plugin to set anchor tag's class attribute to differentiate between internal and external links
License: GNU Affero General Public License v3.0
This bug has been mentioned by GalaxyMaster in issue #32 : βthe documented configuration does not match (and does not work) with the plugin. It requires three arguments instead of two in each tupple.β
This must be fixed.
Due to Python-Markdown/markdown@d18c3d0#diff-797c6da32780122232df19c7a2e709ebL341, the classes LinkPattern
and ReferencePattern
are no longer found and building the pelican site fails.
The new classes are now called LinkInlineProcessor
and ReferenceInlineProcessor
, and their handleMatch()
method requires one additional argument.
This issue tracks the conversion of Link Class to a namespace plugin.
Currently, the logic is purely based on whether the link has "https?://" as the string prefix for href
. However, there are quite a few sites that use SITEURL
Pelican setting to define the full URL for the generated internal links (this is mostly needed to support things like the sitemap plugin and others). When SITEURL
is defined, this plugin would mark all links as external, which kind of renders it useless in these configurations.
For example, this markdown:
This is an [external link][my_url].
[my_url]: https://github.com/rlaboiss/pelican-linkclass/
The URL is external, but it doesn't get tagged as such.
Hi all,
I am on Ubuntu 22.04 with Python 3.10 and Pip 24.0 and I have installed pelican-linkclass (python3 -m pip install --user pelican-linkclass
) but it is not importable.
In an interpreter, this causes an ImportError:
from pelican.plugins import linkclass
whereas it works for the plugin search
for example.
The distribution info of the plugin is sitting in ~/.local/lib/python3.10/site-packages
with name pelican_linkclass-2.1.3.dist-info
alongside other namespace plugins such as search
and similar-posts
which can be imported normally.
However, contrary to these other plugins, it is not present in the subdirectory pelican/plugins/
. Accordingly, when running pelican -D
, we see that it does not discover it in the namespace plugins.
What's causing this? One difference I see is that packaging was done with pdm
for linkclass, whereas other plugins were packaged with poetry
.
At the moment I have to clone this repository and manually copy the proper folder into the pelican installation to make it work.
Thanks a lot for your help.
Hi! What do you think about making this plugin available through PyPI?
Or, if you don't want to, are you ok with me publishing it?
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.