Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make recent posts section dynamic #13

Open
diethardsteiner opened this issue Jun 26, 2014 · 0 comments
Open

Make recent posts section dynamic #13

diethardsteiner opened this issue Jun 26, 2014 · 0 comments

Comments

@diethardsteiner
Copy link

First of all: Thanks for the great template!
I made a few small changes on my copy ... so I'd like to feed this back: This is how you can make the Recent Posts section dynamic:

  <div class="recent-posts">
  <h1>Recent Posts</h1>

    <ul class="homepage-posts most-recent">
    {% for post in site.posts limit:1 %}
    <li><span><h4><a href="{{ site.baseurl }}{{ post.url }}">{{ post.title }}</a>&nbsp;<span class="badge"><smaller>FRESH</smaller></span><time class="pull-right">{{ post.date | date: '%B %d, %Y' }}</h4></time></span></h4></span></li>
    {% endfor %}

    {% for post in site.posts offset:1 limit:4 %}
    <ul class="homepage-posts">
      <li><span><h4><a href="{{ site.baseurl }}{{ post.url }}">{{ post.title }}</a><time class="pull-right">{{ post.date | date: '%B %d, %Y'}}</h4></time></span></h4></span></li>
    </ul>
    {% endfor %}

    <ul>
      <a href="{{ site.baseurl }}/list.html">View More...</a>
    </ul>
  </div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant