diff --git a/Gemfile b/Gemfile index 7a2f050..5825b0d 100644 --- a/Gemfile +++ b/Gemfile @@ -7,6 +7,7 @@ group :jekyll_plugins do gem "jekyll-paginate" gem "jekyll-redirect-from" gem "jekyll-seo-tag", "~> 2.6.1" + gem "jekyll-archives" end group :test do diff --git a/_config.yml b/_config.yml index 8995311..b18e3fd 100644 --- a/_config.yml +++ b/_config.yml @@ -161,7 +161,6 @@ defaults: label: Home url: / - sass: sass_dir: /assets/css style: compressed @@ -198,3 +197,13 @@ sitemap_exclude: # Sitemap will exclude the following items. - sitemap.xml - robots.txt - redirects.json + +# see: +jekyll-archives: + enabled: [categories, tags] + layouts: + category: category + tag: tag + permalinks: + tag: '/tags/:name/' + category: '/categories/:name/' diff --git a/_layouts/category.html b/_layouts/category.html index 70fec40..ccc7d46 100644 --- a/_layouts/category.html +++ b/_layouts/category.html @@ -10,11 +10,11 @@ layout: page

{{ page.title }} - {{ site.categories[page.category] | size }} + {{ page.posts | size }}

- \ No newline at end of file + diff --git a/_layouts/tag.html b/_layouts/tag.html index 646162d..1e67f6e 100644 --- a/_layouts/tag.html +++ b/_layouts/tag.html @@ -11,10 +11,10 @@ layout: page

{{ page.title }} - {{ site.tags[page.tag] | size }} + {{ page.posts | size }}

- \ No newline at end of file +