1
我有一個Octopress網站,其中有帖子和頁面。現在我想添加另一類我想打電話的頁面作爲writepus
(筆記,我將通過git提交像Wiki一樣更新)。如何在Octopress或Jekyll中創建頁面排序列表?
我想將這些註釋保存在一個名爲_notes
的文件夾中,就像Octopress的source
文件夾中有_posts
一樣。
我有一個與文件,如所謂的_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實現此功能?
感謝您的指點。讓我設置更新的版本並嘗試一下。 – tuxdna