Skip to content
Permalink
Browse files

Limit blog posts to first 10

  • Loading branch information
desiredpersona committed Jan 9, 2019
1 parent e601721 commit 67840bbfb80c58d746e4f58ee1eb99f69819c404
Showing with 5 additions and 1 deletion.
  1. +1 −0 _config.yml
  2. +4 −1 _layouts/blog.html
@@ -58,6 +58,7 @@ text:
caption : Image # Header image caption
post_heading : Latest Posts # Latest posts heading
post_limit : 3 # Show this many latest post on your homepage
blog_limit : 10 # Show this many post on the blog
read_more : Read more # Read more link
blog_title : All Posts # Archives link title
blog_url : /blog/ # Archive link url for home.html and 404 page layouts
@@ -5,7 +5,7 @@
<section class="flex flex-column mw7 center ph3 ph4-ns f5 f4-ns fw3 lh-copy mb0">
<h1 class="f5 fw4 lh-title mb0 pb2 bb b--light-gray">{{ page.title }}</h1>

{% for post in site.posts %}
{% for post in site.posts limit: site.text.blog_limit %}
<a class="link black-80 hover-silver" href="{{ post.url | relative_url }}">
<article class="f5 lh-copy fw3 pb4 bb b--light-gray">
<div class="f6 fw6 lh-title ttu tracked mv4"><time>{{ post.date | date: "%b %Y" }}</time></div>
@@ -23,4 +23,7 @@ <h3 class="f3 fw6 lh-title mb0">{{ post.title | escape }}</h3>
</article>
</a>
{% endfor %}
<div class="inline-flex">
<p class="f5 f4-ns fw3 mt5">Read older posts from the <a class="black-80 hover-silver" href="{{ "/archive/" | relative_url }}">Archive</a></p>
</div>
</section>

0 comments on commit 67840bb

Please sign in to comment.
You can’t perform that action at this time.