如何在 lektor 的降价部分插入图像。特别是,url 过滤器是否在 markdown 中工作,或者还有谁可以引用 assets/static/ 中的图像位置?
问问题
990 次
2 回答
4
大多数情况下,在管理站点中,您希望嵌入左侧“附件”列表中列出的文件。为此,只需使用附件文件名,如下所示:

于 2017-01-11T00:08:31.397 回答
2
使用标准降价来插入图像。对于命名my-image.jpg
存储在assets/static/
使用以下降价代码的图像:
<!-- 1) Inserts an image with an empty alt parameter, but better to use the 2nd or the 3rd example -->

<!-- 2) Inserts an image also with the text "fancy picture" as the alt parameter value -->

<!-- 3) Image also has the title attribute -->

上面的代码片段将生成结果 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
。
于 2016-10-27T19:46:13.083 回答