在 Jekyll 环境中使用 amp-img
use of amp-img in the context of Jekyll
我尝试在 jekyll 中使用 amp-img 标签
代码是
<amp-img
width="16"
height="16"
alt="phone icon"
scr="{{ 'assets/images/icons/Phone_number-16px-16px.png' | absolute_url }}"
layout="responsive">
</amp-img>
or
<amp-img
width="16"
height="16"
alt="phone icon"
scr="{{ 'assets/images/icons/Phone_number-16px-16px.png' | relative_url }}"
layout="responsive">
</amp-img>
我阅读了以下文档
:
https://www.ampproject.org/docs/reference/components/amp-img
我确定绝对url会导致我的形象(我已经测试过了)。但是我看不到图像。预先感谢您的回答
我认为我根据文档 (https://github.com/juusaw/amp-jekyll) 以错误的方式集成了 "amp.html" 文件。
我把它放在 _layouts 文件夹中,但没有在其他地方使用它。由于我测试的图像在 _includes/header.html 文件中,如下所示:
https://github.com/flamant/fileshare/blob/master/header.html
我看不到 "amp.html" 文件的实用性。我应该更改它,将它集成到某个地方,在某个地方引用它吗?谢谢你的回答
您好,我已 ping 插件开发人员,但直到现在还没有得到答复。我向前推进并提出一个新的 "header.html" 至极如下:https://github.com/flamant/fileshare/blob/master/header_1.html
但是我在控制台中有以下错误
我不明白为什么它不考虑我的 src 属性。我在浏览器上检查了我编写的每个 url,它会生成正确的图像。提前谢谢你
我尝试在 jekyll 中使用 amp-img 标签 代码是
<amp-img
width="16"
height="16"
alt="phone icon"
scr="{{ 'assets/images/icons/Phone_number-16px-16px.png' | absolute_url }}"
layout="responsive">
</amp-img>
or
<amp-img
width="16"
height="16"
alt="phone icon"
scr="{{ 'assets/images/icons/Phone_number-16px-16px.png' | relative_url }}"
layout="responsive">
</amp-img>
我阅读了以下文档 : https://www.ampproject.org/docs/reference/components/amp-img
我确定绝对url会导致我的形象(我已经测试过了)。但是我看不到图像。预先感谢您的回答
我认为我根据文档 (https://github.com/juusaw/amp-jekyll) 以错误的方式集成了 "amp.html" 文件。
我把它放在 _layouts 文件夹中,但没有在其他地方使用它。由于我测试的图像在 _includes/header.html 文件中,如下所示:
https://github.com/flamant/fileshare/blob/master/header.html
我看不到 "amp.html" 文件的实用性。我应该更改它,将它集成到某个地方,在某个地方引用它吗?谢谢你的回答
您好,我已 ping 插件开发人员,但直到现在还没有得到答复。我向前推进并提出一个新的 "header.html" 至极如下:https://github.com/flamant/fileshare/blob/master/header_1.html
但是我在控制台中有以下错误