In Pelican, how can I link an image to its fullsize version?

自闭症网瘾萝莉.ら 提交于 2019-12-12 16:54:41

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!