Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ gem 'jekyll-sitemap'
gem 'jekyll-feed'
gem "jekyll-gist"
gem 'github-pages'
gem 'jekyll-paginate-v2'
13 changes: 13 additions & 0 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,20 @@ plugins:
- jekyll-feed
- jekyll-sitemap
- jekyll-gist
- jekyll-paginate-v2

# Exclude list
include: [_pages]
exclude: [README.md, Gemfile, Gemfile.lock, _site, src, vendor, CNAME, LICENSE, Rakefile, .sass-cache, .DS_Store]

permalink: /:year-:month-:day-:title/

pagination:
enabled: true
debug: false
per_page: 3
permalink: '/page/:num/'
title: ':title - Página :num'
limit: 0
sort_field: 'date'
sort_reverse: true
26 changes: 26 additions & 0 deletions _includes/pagination.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{% if paginator.total_pages > 1 %}

<div class="pagination">
{% if paginator.previous_page %}
<a href="{{ paginator.previous_page_path | prepend: site.baseurl | replace: '//', '/' }}">&laquo; Prev</a>
{% else %}
<span>&laquo; Prev</span>
{% endif %}

{% for page in (1..paginator.total_pages) %}
{% if page == paginator.page %}
<em>{{ page }}</em>
{% elsif page == 1 %}
<a href="{{ '/index.html' | prepend: site.baseurl | replace: '//', '/' }}">{{ page }}</a>
{% else %}
<a href="{{ site.paginate_path | prepend: site.baseurl | replace: '//', '/' | replace: ':num', page }}">{{ page }}</a>
{% endif %}
{% endfor %}

{% if paginator.next_page %}
<a href="{{ paginator.next_page_path | prepend: site.baseurl | replace: '//', '/' }}">Next &raquo;</a>
{% else %}
<span>Next &raquo;</span>
{% endif %}
</div>
{% endif %}
7 changes: 6 additions & 1 deletion _layouts/misceleneous.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,14 @@ <h1> {{ page.title }} </h1>
{% endif %}
<ul class="posts-list">
{% for post in site.posts %}
<h1>{{ post.title }}</h1>
{% if post.categories contains 'misceleneous' %}
{% for lala in paginator.posts %}
<h1>++{{ lala.title }}</h1>
{% endfor %}
{% include post_list.html %}
{% endif %}
{% endfor %}
</ul>
</div>
{% include pagination.html %}
</div>
2 changes: 2 additions & 0 deletions misceleneous.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,6 @@
title: Misceleneous
layout: misceleneous
permalink: /misceleneous/
pagination:
enabled: yes
---