1
0
mirror of https://github.com/danbee/danbarber.me synced 2025-03-04 08:59:10 +00:00

Add separate blog index page and show all posts on the front page

This commit is contained in:
Daniel Barber 2019-08-14 07:50:57 -04:00
parent 5236e9f39a
commit e93f74c9b8
Signed by: danbarber
GPG Key ID: 931D8112E0103DD8
3 changed files with 33 additions and 2 deletions

View File

@ -6,7 +6,7 @@
<nav role="navigation" class="site-header__navigation">
<ul>
<li><a href="{{ root_url }}/">Blog</a></li>
<li><a href="{{ root_url }}/blog">Blog</a></li>
<li><a href="{{ root_url }}/photos">Photos</a></li>
<li><a href="{{ root_url }}/about">About</a></li>
</ul>

32
blog/index.html Normal file
View File

@ -0,0 +1,32 @@
---
layout: default
pagination:
enabled: true
category: blog
---
{% assign index = true %}
{% include header.html %}
<div id="content">
{% for post in paginator.posts %}
{% assign content = post.content %}
<article class="article">
{% include index_article.html %}
</article>
{% endfor %}
<div class="container pagination">
{% if paginator.next_page %}
<a class="prev" href="{{ paginator.next_page_path }}">&larr; Older</a>
{% endif %}
{% if paginator.previous_page %}
<a class="next" href="{{ paginator.previous_page_path }}">Newer &rarr;</a>
{% endif %}
</div>
</div>
{% include footer.html %}

View File

@ -2,7 +2,6 @@
layout: default
pagination:
enabled: true
category: blog
---
{% assign index = true %}