Twitter bootstrap 如何将博客(blog.html)添加到我的非博客;“杰基尔”;网站(index.html)? 情况:

Twitter bootstrap 如何将博客(blog.html)添加到我的非博客;“杰基尔”;网站(index.html)? 情况:,twitter-bootstrap,jekyll,blogs,Twitter Bootstrap,Jekyll,Blogs,我从一个引导模板开始创建一个单卷网站 我已经想出了如何添加另一个页面&在主页和第二个页面之间导航。现在我想在第二页上建立一个博客 到目前为止,我只看到了一些教程,它们解释了如何从index.html创建一个带有博客主题的jekyll博客 然而 现在我想从blog.html构建一个博客,如果我想让我的博客页面看起来像这样,我从哪里开始呢? 主要问题 如何将2017-11-12-first_post.md从root\u posts链接到blog.html 网站链接: 链接到repo:在博客布局中,

我从一个引导模板开始创建一个单卷网站

我已经想出了如何添加另一个页面&在主页和第二个页面之间导航。现在我想在第二页上建立一个博客

到目前为止,我只看到了一些教程,它们解释了如何从
index.html
创建一个带有博客主题的jekyll博客

然而

现在我想从
blog.html
构建一个博客,如果我想让我的博客页面看起来像这样,我从哪里开始呢?

主要问题 如何将
2017-11-12-first_post.md
从root
\u posts
链接到
blog.html

网站链接:


链接到repo:

在博客布局中,您应该循环浏览帖子,如下所示:

{% for item in site.posts %}
  {{ item.title }}
{% endfor %}
---
title: Blog
layout: blog
---
链接blog.md文件前面的新布局,如下所示:

{% for item in site.posts %}
  {{ item.title }}
{% endfor %}
---
title: Blog
layout: blog
---
布局是一个名为blog.html的文件,应该放在_layouts目录中。blog.md文件应该放在项目的根目录中

如果只想显示第一篇文章,请使用
limit:1

{% for item in site.posts limit:1 %}
  {{ item.title }}
{% endfor %}

只需添加一个新的菜单项并将其链接到blog.html