1

我有一个 Octopress 网站,里面有帖子和页面。现在我想添加另一类我想称为的页面writepus(我将通过 git 提交像 wiki 一样不断更新的注释)。

我想将这些笔记保存在一个名为 的文件夹中_notes,就像我们_postssourceOctopress 的文件夹中一样。

我有一个文件夹,其中包含以下_writeups/文件:

subject1.html
subject2.html

我有一个名为notes/list.html以下内​​容的文件。

---
layout: page
navbar: Notes
title: Notes
footer: false
---

<div id="blog-archives">
{% for post in site.writeups reverse %}
{% capture this_year %}{{ post.date | date: "%Y" }}{% endcapture %}
{% unless year == this_year %}
  {% assign year = this_year %}
  <h2>{{ year }}</h2>
{% endunless %}
<article class="page-header">
  {% include archive_post.html %}
</article>
{% endfor %}
</div>

基本上我想创建这些文章的列表,以便我可以在有时间时不断更新它们。posts我也想将这些与和分开pages

如何使用 Octopress / Jekyll 实现此功能?

4

1 回答 1

1

Jekyll 版本 2,最近才发布,有能力拥有额外的集合数据。Collections 可能是您正在寻找的东西,因此请升级您的 Jekyll 版本并访问http://jekyllrb.com/docs/collections/以了解有关它们的更多信息。

于 2014-06-09T06:02:01.830 回答