问题
In my Pelican blog article I have something like this:
![Alt Text]({filename}/images/foo.jpg)
This works fine as it includes foo.jpg into the article, i.e., it creates
<img src="/images/foo.jpg" alt="Alt Text">
However, I'd like to make this image clickable so users can link the image to go to a URL for the full-size image, i.e.
<a href="/images/foo.jpg"><img src="/images/foo.jpg" alt="Alt Text"></a>
How can I do that in Pelican?
Thanks.
回答1:
Perhaps try:
[![Alt Text]({filename}/images/foo.jpg)]({filename}/images/foo.jpg)
... or:
[<img src="{filename}/images/foo.jpg">]({filename}/images/foo.jpg)
Related: https://meta.stackexchange.com/questions/38915/creating-an-image-link-in-markdown-format
回答2:
Did you try dropping the HTML directly into the Markdown file? It'll work just fine.
来源:https://stackoverflow.com/questions/24983810/in-pelican-how-can-i-link-an-image-to-its-fullsize-version