{% assign posts = site.categories | default:site.tags | default:site.posts %}
<ul id=“post-list”>
{% for post in posts %} <li> <a href="{{ site.baseurl }}{{ post.url | remove_first: '/' }}">{{ post.title }} {{ post.date | date:"%b %d, %Y" }} </a> </li> {% endfor %}
</ul>
<!– Pagination links –> {% if paginator.total_pages > 1 %} <div class=“pagination”>
{% if paginator.previous_page %} <a href="{{ paginator.previous_page_path | relative_url }}">« Prev</a> {% else %} <span>« Prev</span> {% endif %} <small>|</small> {% for page in (1..paginator.total_pages) %} {% if page == paginator.page %} {{ page }} {% elsif page == 1 %} <a href="{{ paginator.previous_page_path | relative_url }}">{{ page }}</a> {% else %} <a href="{{ site.paginate_path | relative_url | replace: ':num', page }}">{{ page }}</a> {% endif %} <small>|</small> {% endfor %} {% if paginator.next_page %} <a href="{{ paginator.next_page_path | relative_url }}">Next »</a> {% else %} <span>Next »</span> {% endif %}
</div> {% endif %}