在我的项目中设置amp-jekyll的清单 [英] sump up of setting up amp-jekyll in my project

查看:96
本文介绍了在我的项目中设置amp-jekyll的清单的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在研究jekyll项目,并且已经在stackoverflow和jekyll讨论站点上问了一些问题.这篇文章是关于我关于设置amp-jekyll的问题的总结. amp-Jekyll是一个jekyll插件.完整文档位于以下地址: https://github.com/juusaw/amp-jekyll

I am working on a jekyll project and already asked some questions on stackoverflow and jekyll talks site. This post is a sump up for the issue I have about setting up amp-jekyll. amp-Jekyll is a jekyll plugin. The full documentation is at this adress : https://github.com/juusaw/amp-jekyll

我的项目的树如下

我的jekyll版本是jekyll-3.6.2 我使用Gemfile安装了插件(安装了宝石"amp-jekyll","1.0.2").我检查了插件是否安装正确. 然后,我遵循了文档:

1)我放置了布局文件(amp.html位于 https://github.com/juusaw/amp-jekyll/blob/master/amp.html )添加到_layouts文件夹.我对此有第一个问题.我查看了此文件,但不知道如何使用它.我只是将其复制到_layouts文件夹中,就是全部,还是让我将其一部分复制到另一个文件中(如果这样,在哪里?).我可以在主体部分看到{{ header | amp_images }}{{ footer | amp_images: false, 24, 24 }}的用法.那是什么意思 ? .那么头标中包含的部分呢?

2)然后,我添加了amphtml-link来发布标题(将CSS样式添加到html模板).就我而言,我只是复制以下代码

My Version of jekyll is jekyll-3.6.2 I installed the plugin using the Gemfile (gem "amp-jekyll", "1.0.2" # installed). I checked that the plugin is well installed. Then I followed the documentation:

1) I Placed the layout file (amp.html at https://github.com/juusaw/amp-jekyll/blob/master/amp.html) to the _layouts folder. I have a first question about that. I looked at this file and don't know how to use it. Have I just to copy it in the _layouts folder and that's all or have I to take a part of it and copy it to another file (and if so where ?). I can see in the body part the use of {{ header | amp_images }} or {{ footer | amp_images: false, 24, 24 }}. What does that mean ? . And what about the part included in head tag ?

2) Then, I Added amphtml-link to post heads (Add CSS styles to the html template). In my case I just copy the following code

{% if page.path contains '_posts' %}
  <link rel="amphtml" href="https://localhost::4000/inger/toto.html">
{% endif %}

在我的footer.html文件中带有伪造的href网址( https://github.com/flamant/fileshare/blob/master/footer.html )..关于此代码段,我还有第二个问题.这是什么链接?且是否将此页面发布为帖子?

3)然后运行bundle exec jekyll serve

with a faked href url in my footer.html file (https://github.com/flamant/fileshare/blob/master/footer.html).. I have a second question about this snippet of code. What is this link ? and is it taken into consideration if this page a post ?

3) And I run bundle exec jekyll serve

第一个发布的女巫是index.html.代码是

The first page witch is published is index.html. the code is

---
layout: default
title: Hank Quinlan, Horrible Cop
lang: fr
---
<div class="blurb">
    <h1>This is content</h1>
</div> 

default.html文件(在_layouts文件夹中)如下

The default.html file (in _layouts folder) is the following

<!DOCTYPE html>

{% include header.html %}

{{ content }}

{% include footer.html %}

header.html位于以下位置: https://github.com/flamant/fileshare/blob/master/header.html 我显示(但看不到)的第一张图像在此文件中.

所以我的主要问题是:为什么我看不到图像?

And the header.html is at the following location : https://github.com/flamant/fileshare/blob/master/header.html The first images that I display (and that I can't see) are in this file.

So my main question is : Why I can't see the images ?

推荐答案

最后,我发现了问题所在:该属性应为src而不是scr.我对问这个问题感到困惑.

finally I found what was going wrong : the attribute should be src instead of scr. I am confused about asking this question.

这篇关于在我的项目中设置amp-jekyll的清单的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆