Created
February 24, 2012 08:50
-
-
Save pizn/1899544 to your computer and use it in GitHub Desktop.
category layout for jekyll blog
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
layout: default | |
--- | |
<!-- | |
这里是 category_index.html 文件,里面使用到的一些 DOM 结构依赖 pizn.me 的样式。但您可以只参考里面的 jekyll 语法就好。这里的作用是显示出 category 分类列表。 | |
--> | |
<section class="content fn-clear"> | |
<div class="content-cnt"> | |
<div class="ui-grid-25 ui-grid-right content-top"> | |
<section class="ui-grid-19 violet-post"> | |
<div class="v-section-tit"> | |
<a href="/" rel="nofollow" >Home</a> | |
<span>♦</span> | |
<a href="/archives.html" rel="nofollow" >Archives</a> | |
<span>♦</span> | |
<h2>Category:  {{ page.category }}</h2> | |
</div> | |
{% for post in site.categories.[page.category] %} | |
<div class="violet-archive fn-clear"> | |
<p class="ui-grid-2 year">{{ post.date | date: '%Y' }}</p> | |
<div class="ui-grid-17 ui-grid-right ui-grid-bottom"> | |
<article class="article fn-clear"> | |
<div class="ui-grid-6 v-archive-tit"> | |
<p class="v-date"><span>‣</span><time pubdate="{{ post.date | date: '%b %d, %Y' }}">{{ post.date | date: '%b %d' }}</time></p> | |
<h3><a href="{{ post.url }}">{{ post.title }}</a></h3> | |
</div> | |
<div class="ui-grid-11 v-archive-det"> | |
<p>{{ post.description }}</p> | |
</div> | |
</article><!-- //archive --> | |
</div> | |
</div> | |
{% endfor %} | |
</section><!-- //violet-post --> | |
{% include aside.html %} | |
</div> | |
</div> | |
</section><!-- //content --> |
18行 {% for post in site.categories.[page.category] %}
Liquid Warning: Liquid syntax error (line 15): Expected id but found open_square in "post in site.categories.[page.category]" in category_index.html
Liquid Exception: Could not locate the included file 'aside.html' in any of ["/_includes"]. Ensure it exists in one of those directories and, if it is a symlink, does not point outside your site source. in category_index.html
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
第16行少了个分号