在具有自定义大小属性的 Jekyll post 中包含图像
Including an image in a Jekyll post with custom size attribute
在 Jekyll 中 post 我想包含地址 images/posters/surfaces.png
中的图像。
此外,我希望它的宽度为 750px。
我尝试了 <img src={images/posters/surfaces.png} alt="Poster" style="width: 750px;"/>
和 <img src="images/posters/surfaces.png" alt="Poster" style="width: 750px;"/>
但没有成功。
我应该改用什么语法?
相对链接会导致混淆,最好使用绝对 URL,例如:
{{ "images/posters/surfaces.png" | absolute_url }}
或者如果您不想在子目录中使用 Jekyll,只需使用 /images/posters/surfaces.png
(注意前导斜杠)。
在 Jekyll 中 post 我想包含地址 images/posters/surfaces.png
中的图像。
此外,我希望它的宽度为 750px。
我尝试了 <img src={images/posters/surfaces.png} alt="Poster" style="width: 750px;"/>
和 <img src="images/posters/surfaces.png" alt="Poster" style="width: 750px;"/>
但没有成功。
我应该改用什么语法?
相对链接会导致混淆,最好使用绝对 URL,例如:
{{ "images/posters/surfaces.png" | absolute_url }}
或者如果您不想在子目录中使用 Jekyll,只需使用 /images/posters/surfaces.png
(注意前导斜杠)。