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
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ group :jekyll_plugins do
gem 'jekyll-sitemap', '1.4.0'
gem 'jekyll-redirect-from'
gem 'tzinfo'
gem 'octopress-paginate'
gem 'jekyll-paginate-v2'
end

8 changes: 3 additions & 5 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@ GEM
jekyll (>= 3.6, < 5.0)
jekyll-feed (0.17.0)
jekyll (>= 3.7, < 5.0)
jekyll-paginate-v2 (3.0.0)
jekyll (>= 3.0, < 5.0)
jekyll-redirect-from (0.16.0)
jekyll (>= 3.3, < 5.0)
jekyll-sass-converter (3.1.0)
Expand All @@ -88,10 +90,6 @@ GEM
rb-fsevent (~> 0.10, >= 0.10.3)
rb-inotify (~> 0.9, >= 0.9.10)
mercenary (0.4.0)
octopress-hooks (2.6.2)
jekyll (>= 2.0)
octopress-paginate (1.2.0)
octopress-hooks
pathutil (0.16.2)
forwardable-extended (~> 2.6)
public_suffix (6.0.1)
Expand Down Expand Up @@ -179,10 +177,10 @@ DEPENDENCIES
jekyll (= 4.4.1)
jekyll-archives (= 2.3.0)
jekyll-feed
jekyll-paginate-v2
jekyll-redirect-from
jekyll-seo-tag (= 2.8.0)
jekyll-sitemap (= 1.4.0)
octopress-paginate
tzinfo
tzinfo-data
wdm (>= 0.1.0)
Expand Down
5 changes: 3 additions & 2 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ plugins:
- jekyll-seo-tag
- jekyll-feed
- jekyll-redirect-from
- octopress-paginate
- jekyll-paginate-v2

timezone: Etc/UTC

Expand Down Expand Up @@ -89,8 +89,9 @@ permalink: /blog/:year/:month/:name/
# sort_field: "date"
# sort_reverse: true
pagination:
enabled: true
per_page: 11
permalink: "/page:num"
permalink: "/page/:num/"

# # Site-wide kill switch, disabled here it doesn't run at all
# enabled: true
Expand Down
5 changes: 3 additions & 2 deletions _config_dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ plugins:
- jekyll-sitemap
- jekyll-seo-tag
- jekyll-feed
- octopress-paginate
- jekyll-paginate-v2

timezone: Etc/UTC

Expand Down Expand Up @@ -88,8 +88,9 @@ permalink: /blog/:year/:month/:name/
# sort_field: "date"
# sort_reverse: true
pagination:
enabled: true
per_page: 11
permalink: "/page:num"
permalink: "/page/:num/"

# # Site-wide kill switch, disabled here it doesn't run at all
# enabled: true
Expand Down
8 changes: 4 additions & 4 deletions _includes/pagination.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,23 +32,23 @@
{% endif %}

{% if start > 1 %}
<a class="pagination-first" href="{{ site.baseurl }}/">1</a>
<a class="pagination-first" href="{{ site.baseurl }}/blog/">1</a>
<span class="pagination-more">&middot;&middot;&middot;</span>
{% endif %}

{% for page in (start..end) %}
{% if page == paginator.page %}
<span class="active">{{ page }}</span>
{% elsif page == 1 %}
<a href="{{ site.baseurl }}/blog">{{ page }}</a>
<a href="{{ site.baseurl }}/blog/">{{ page }}</a>
{% else %}
<a href="{{ site.baseurl }}/blog/page{{ page }}">{{ page }}</a>
<a href="{{ site.baseurl }}/blog/page/{{ page }}/">{{ page }}</a>
{% endif %}
{% endfor %}

{% if end < paginator.total_pages %}
<span class="pagination-more">&middot;&middot;&middot;</span>
<a class="pagination-last" href="{{ site.baseurl }}/blog/page{{ paginator.total_pages }}">{{ paginator.total_pages }}</a>
<a class="pagination-last" href="{{ site.baseurl }}/blog/page/{{ paginator.total_pages }}/">{{ paginator.total_pages }}</a>
{% endif %}

{% if paginator.next_page %}
Expand Down
9 changes: 6 additions & 3 deletions blog/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,13 @@
description: Explore all Meshery blog posts, tutorials, and updates.
layout: page
permalink: /blog
paginate:
redirect_from:
- /blog/page/
pagination:
enabled: true
collection: posts
per_page: 6
permalink: "/page:num"
permalink: "/page/:num/"
---

<div class="blog-container">
Expand Down Expand Up @@ -52,7 +55,7 @@ <h3 style="font-size:1.5rem;text-align: center;margin:auto;">Categories</h3>
{% assign category = parts[1] %}
{% assign count = parts[0] | plus: 0 %}
<li>
<a href="/blog/category/{{ category | slugify }}">
<a href="/blog/category/{{ category | slugify }}/">
{{ category }} <span class="cat-count">({{ count }})</span>
</a>
</li>
Expand Down
2 changes: 1 addition & 1 deletion collections/_pages/categories.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

{% for category in sorted_categories %}
<li>
<a href="{{ site.baseurl }}/category/{{ category[0] | slugify }}"> {{ category[0] | downcase }} ({{ category[1].size }})</a>
<a href="{{ site.baseurl }}/blog/category/{{ category[0] | slugify }}/"> {{ category[0] | downcase }} ({{ category[1].size }})</a>
</li>
{% endfor %}
</ul>
Expand Down
Loading