add blog index/link; paginate index page
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
safe: true
|
||||
auto: true
|
||||
server: true
|
||||
pygments: true
|
||||
markdown: redcarpet
|
||||
paginate: 7
|
||||
pygments: true
|
||||
safe: true
|
||||
server: true
|
||||
|
||||
@@ -36,6 +36,7 @@
|
||||
<a href="/"><img alt="DPB" src="http://www.gravatar.com/avatar/5544fe6a05400da5a8957ff29dd6718c.png?s=128" /></a>
|
||||
</div>
|
||||
<ul>
|
||||
<li><a href="/blog/">blog</a></li>
|
||||
<li><a href="/projects.html">projects</a></li>
|
||||
<li><a href="/about.html">about</a></li>
|
||||
</ul>
|
||||
|
||||
18
blog/index.html
Normal file
18
blog/index.html
Normal file
@@ -0,0 +1,18 @@
|
||||
---
|
||||
title: Blog Summary
|
||||
layout: default
|
||||
---
|
||||
|
||||
{% for post in site.posts %}
|
||||
<section>
|
||||
<header>
|
||||
<div class="timeline">
|
||||
<time datetime="{{ post.date|date_to_xmlschema }}"><strong>{{ post.date|date:"%b %d"|upcase }}</strong><br />{{ post.date|date:"%Y" }}</time>
|
||||
</div>
|
||||
<h2><a href="{{ post.url }}">{{ post.title }}</a></h2>
|
||||
{% if post.description %}
|
||||
<div class="meta" style="margin-bottom:0;margin-top:0;">{{ post.description }}</div>
|
||||
{% endif %}
|
||||
</header>
|
||||
</section>
|
||||
{% endfor %}
|
||||
11
index.html
11
index.html
@@ -11,7 +11,7 @@ layout: default
|
||||
</p>
|
||||
</section>
|
||||
|
||||
{% for post in site.posts %}
|
||||
{% for post in paginator.posts %}
|
||||
<section>
|
||||
<header>
|
||||
<div class="timeline">
|
||||
@@ -24,3 +24,12 @@ layout: default
|
||||
</header>
|
||||
</section>
|
||||
{% endfor %}
|
||||
|
||||
{% if paginator.next_page %}
|
||||
<section>
|
||||
<header>
|
||||
<h2><a href="/blog/">more posts →</a></h2>
|
||||
<div class="meta" style="margin-bottom:0;margin-top:0;">See the full list of {{ site.posts.size }} posts.</div>
|
||||
</header>
|
||||
</section>
|
||||
{% endif %}
|
||||
|
||||
Reference in New Issue
Block a user