From 1e0ab8327b973eef8cc7a8dbbdea30d6fdd77230 Mon Sep 17 00:00:00 2001 From: Aquila Macedo Date: Tue, 12 Apr 2022 23:07:53 -0300 Subject: [PATCH] _includes: pagination: jekyll pagination. This commit was made for the analysis of the pagination structure. Signed-off-by: Aquila Macedo --- Gemfile | 1 + _config.yml | 13 +++++++++++++ _includes/pagination.html | 26 ++++++++++++++++++++++++++ _layouts/misceleneous.html | 7 ++++++- misceleneous.md | 2 ++ 5 files changed, 48 insertions(+), 1 deletion(-) create mode 100644 _includes/pagination.html diff --git a/Gemfile b/Gemfile index 85fe2c3..60e2549 100644 --- a/Gemfile +++ b/Gemfile @@ -4,3 +4,4 @@ gem 'jekyll-sitemap' gem 'jekyll-feed' gem "jekyll-gist" gem 'github-pages' +gem 'jekyll-paginate-v2' \ No newline at end of file diff --git a/_config.yml b/_config.yml index 990fadf..a87df67 100644 --- a/_config.yml +++ b/_config.yml @@ -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 \ No newline at end of file diff --git a/_includes/pagination.html b/_includes/pagination.html new file mode 100644 index 0000000..81c5f1e --- /dev/null +++ b/_includes/pagination.html @@ -0,0 +1,26 @@ +{% if paginator.total_pages > 1 %} + + +{% endif %} \ No newline at end of file diff --git a/_layouts/misceleneous.html b/_layouts/misceleneous.html index e64d241..9f197af 100644 --- a/_layouts/misceleneous.html +++ b/_layouts/misceleneous.html @@ -9,9 +9,14 @@

{{ page.title }}

{% endif %} - + {% include pagination.html %} + \ No newline at end of file diff --git a/misceleneous.md b/misceleneous.md index 29aabd1..728d626 100644 --- a/misceleneous.md +++ b/misceleneous.md @@ -2,4 +2,6 @@ title: Misceleneous layout: misceleneous permalink: /misceleneous/ +pagination: + enabled: yes ---