如何在lektor markdown部分插入图像?

时间:2016-10-26 13:27:42

标签: lektor

一个有希望的简单问题:如何在lektor的降价部分插入图像。特别是,url过滤器是否在markdown内部工作,或者我还有谁引用assets / static /中的图像位置?

非常感谢您的任何帮助! 亲切的问候 -bud

2 个答案:

答案 0 :(得分:3)

在管理网站的大多数情况下,您希望嵌入左侧“附件”列表中列出的文件。为此,只需使用附件文件名,如:

LEFT JOIN ( SELECT ... )

答案 1 :(得分:1)

使用标准降价插入图像。对于my-image.jpg中存储的名为assets/static/的图片,请使用以下降价代码:

<!-- 1) Inserts an image with an empty alt parameter, but better to use the 2nd or the 3rd example -->
![](/static/my-image.jpg)

<!-- 2) Inserts an image also with the text "fancy picture" as the alt parameter value -->    
![fancy picture](/static/my-image.jpg)


<!-- 3) Image also has the title attribute -->    
![fancy picture](/static/my-image.jpg "Title of the fancy picture")

上面的代码段会生成结果HTML:

<img src="../static/my-image.jpg" alt="">
<img src="../static/my-image.jpg" alt="fancy picture">
<img src="../static/my-image.jpg" alt="fancy picture" title="Title of the fancy picture">

我在我的示例网站上测试了这个代码段,它运行得很好 请注意缩写代码中/之前的static