limit front page to the 4 most recent posts, put all posts on the News page

This commit is contained in:
Sebastian Kuzminsky 2015-11-07 15:06:54 -07:00
parent 2f6e236a9a
commit 96d1023d26
3 changed files with 22 additions and 1 deletions

View file

@ -26,6 +26,7 @@
{% for page in site.pages %}
{% if page.navbar AND page.title %}<a class="page-link" href="{{ page.url | prepend: site.baseurl }}">{{ page.title }}</a>{% endif %}
{% endfor %}
<a class="page-link" href="{{site.baseurl}}/news">News</a>
<a class="page-link" href="http://linuxcnc.org/index.php/english/forum/index">Forum</a>
<a class="page-link" href="http://wiki.linuxcnc.org/">Wiki</a>
</div>

View file

@ -46,7 +46,7 @@ layout: default
<h1>Posts</h1>
<ul class="posts">
{% for post in site.posts %}
{% for post in site.posts limit:4 %}
<li>
<span class="post-date">{{ post.date | date: "%b %-d, %Y" }}</span>
<a class="post-link" href="{{ post.url | prepend: site.baseurl }}">{{ post.title }}</a>

20
news.md Normal file
View file

@ -0,0 +1,20 @@
---
layout: default
---
<div class="home">
<h1>All Posts</h1>
<ul class="posts">
{% for post in site.posts %}
<li>
<span class="post-date">{{ post.date | date: "%b %-d, %Y" }}</span>
<a class="post-link" href="{{ post.url | prepend: site.baseurl }}">{{ post.title }}</a>
</li>
{% endfor %}
</ul>
<p class="rss-subscribe">subscribe <a href="{{ "/feed.xml" | prepend: site.baseurl }}">via RSS</a></p>
</div>