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:
parent
5236e9f39a
commit
e93f74c9b8
@ -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
32
blog/index.html
Normal 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 }}">← Older</a>
|
||||
{% endif %}
|
||||
|
||||
{% if paginator.previous_page %}
|
||||
<a class="next" href="{{ paginator.previous_page_path }}">Newer →</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% include footer.html %}
|
||||
@ -2,7 +2,6 @@
|
||||
layout: default
|
||||
pagination:
|
||||
enabled: true
|
||||
category: blog
|
||||
---
|
||||
|
||||
{% assign index = true %}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user