Lektor のマークダウン セクションに画像を挿入するにはどうすればよいですか。特に、url フィルターはマークダウン内で機能しますか、それとも assets/static/ 内の画像の場所を参照するのは誰ですか?
2 に答える
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">
サンプル Web サイトでこのスニペットをテストしたところ、完全に機能しました。マークダウン コードのbeforeに
注意してください。/static
于 2016-10-27T19:46:13.083 に答える