Generate a special class on image links? #3171
Replies: 1 comment 1 reply
-
Pelican hands your source content to the respective library for that source content. You didn't specify what format your source content is, but for the moment I will assume it is in Markdown format. In that case, Pelican hands your source content to Python-Markdown, and thus Pelican itself has no control over how that library converts Markdown to HTML. It is possible that there may be a Python-Markdown extension that can help you accomplish your objective: https://github.com/Python-Markdown/markdown/wiki/Third-Party-Extensions Alternatively, there are Pelican plugins that relate to your target objective, although I suspect neither will achieve precisely what you want in their current form: One approach could be to review the source code for the Injector plugin, modify it appropriately to support a generalized use case that also addresses your specific need, and then submit a pull request to that repository for inclusion in that plugin. |
Beta Was this translation helpful? Give feedback.
-
I am trying to style images a bit unconventionally, which conflicts with link styles when an image is wrapped with a link (
a > img
).I tried to override some of the link styles if a link contains an img using the
a:has(> img)
selector, but I discovered that Firefox does not support it.What I would like is to have the generator produce the generate the following HTML from text links and image links:
Is it possible to do with Pelikan? Here are my dependency versions:
Thank you in advance!
Beta Was this translation helpful? Give feedback.
All reactions