From 4c2867d296dd8f1d6cf438df1437ba729326989a Mon Sep 17 00:00:00 2001 From: Valentino Urbano Date: Mon, 23 Dec 2019 11:15:37 +0100 Subject: [PATCH] add archives --- Gemfile | 14 +++---- Gemfile.lock | 3 ++ _config.yml | 19 +++++++++ _layouts/archive-day.html | 67 +++++++++++++++++++++++++++++++ _layouts/archive-month.html | 67 +++++++++++++++++++++++++++++++ _layouts/archive-tagcategory.html | 67 +++++++++++++++++++++++++++++++ _layouts/archive-year.html | 67 +++++++++++++++++++++++++++++++ 7 files changed, 297 insertions(+), 7 deletions(-) create mode 100644 _layouts/archive-day.html create mode 100644 _layouts/archive-month.html create mode 100644 _layouts/archive-tagcategory.html create mode 100644 _layouts/archive-year.html diff --git a/Gemfile b/Gemfile index 890812ab..8d2c3fe9 100644 --- a/Gemfile +++ b/Gemfile @@ -1,13 +1,13 @@ -source 'https://rubygems.org' +source "https://rubygems.org" -# 'github-pages' includes 'jekyll' gem -gem 'github-pages' -gem 'bourbon' -gem 'jemoji' +gem "github-pages" +gem "bourbon" +gem "jemoji" gem "jekyll-time-to-read" -gem 'html-proofer' +gem "html-proofer" gem "jekyll-assets" +gem "jekyll-archives" group :jekyll_plugins do - gem 'pagemaster' + gem "pagemaster" end \ No newline at end of file diff --git a/Gemfile.lock b/Gemfile.lock index a7494767..5eae7e72 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -113,6 +113,8 @@ GEM pathutil (~> 0.9) rouge (>= 1.7, < 4) safe_yaml (~> 1.0) + jekyll-archives (2.2.1) + jekyll (>= 3.6, < 5.0) jekyll-assets (2.4.0) concurrent-ruby (~> 1.0) extras (~> 0.2) @@ -279,6 +281,7 @@ DEPENDENCIES bourbon github-pages html-proofer + jekyll-archives jekyll-assets jekyll-time-to-read jemoji diff --git a/_config.yml b/_config.yml index 2c42edef..a33d3bea 100644 --- a/_config.yml +++ b/_config.yml @@ -10,6 +10,7 @@ plugins: - jekyll-time-to-read - jekyll-sitemap - pagemaster + - jekyll-archives title: "Valentino Urbano" description: > @@ -86,3 +87,21 @@ assets: path: ".jekyll-cache/assets" type: file # Possible values: memory, file enabled: true + +jekyll-archives: + enabled: [ + year, month, day, categories #, tags + ] + layout: archive-tagcategory + layouts: + year: archive-year + month: archive-month + day: archive-day + category: archive-tagcategory + tag: archive-tagcategory + permalinks: + year: '/archive/:year/' + month: '/archive/:year/:month/' + day: '/archive/:year/:month/:day/' + tag: '/archive/tag/:name/' + category: '/archive/category/:name/' \ No newline at end of file diff --git a/_layouts/archive-day.html b/_layouts/archive-day.html new file mode 100644 index 00000000..9cbed0ee --- /dev/null +++ b/_layouts/archive-day.html @@ -0,0 +1,67 @@ + + +{% include head.html %} + + + {% include header.html %} +
+
+ {% if page.image %} +
+
+ Article Image +
+ +
+ {% else %} +
+ +
+
+
+
{% endif %} +
+ + +
    + {% for post in page.posts %} +
  • + + {{ post.title }} +
  • + {% endfor %} +
+ +
+
+
+
+
+ Image +
+
+

{{ site.title }}

+

{{ site.description }}

+ Back to Overview +
+
+ {% include javascripts.html %}{% include footer.html %} + + + \ No newline at end of file diff --git a/_layouts/archive-month.html b/_layouts/archive-month.html new file mode 100644 index 00000000..7f08553c --- /dev/null +++ b/_layouts/archive-month.html @@ -0,0 +1,67 @@ + + +{% include head.html %} + + + {% include header.html %} +
+
+ {% if page.image %} +
+
+ Article Image +
+ +
+ {% else %} +
+ +
+
+
+
{% endif %} +
+ + +
    + {% for post in page.posts %} +
  • + + {{ post.title }} +
  • + {% endfor %} +
+ +
+
+
+
+
+ Image +
+
+

{{ site.title }}

+

{{ site.description }}

+ Back to Overview +
+
+ {% include javascripts.html %}{% include footer.html %} + + + \ No newline at end of file diff --git a/_layouts/archive-tagcategory.html b/_layouts/archive-tagcategory.html new file mode 100644 index 00000000..11aeaf56 --- /dev/null +++ b/_layouts/archive-tagcategory.html @@ -0,0 +1,67 @@ + + +{% include head.html %} + + + {% include header.html %} +
+
+ {% if page.image %} +
+
+ Article Image +
+ +
+ {% else %} +
+ +
+
+
+
{% endif %} +
+ + +
    + {% for post in page.posts %} +
  • + + {{ post.title }} +
  • + {% endfor %} +
+ +
+
+
+
+
+ Image +
+
+

{{ site.title }}

+

{{ site.description }}

+ Back to Overview +
+
+ {% include javascripts.html %}{% include footer.html %} + + + \ No newline at end of file diff --git a/_layouts/archive-year.html b/_layouts/archive-year.html new file mode 100644 index 00000000..bf3dfdda --- /dev/null +++ b/_layouts/archive-year.html @@ -0,0 +1,67 @@ + + +{% include head.html %} + + + {% include header.html %} +
+
+ {% if page.image %} +
+
+ Article Image +
+ +
+ {% else %} +
+ +
+
+
+
{% endif %} +
+ + +
    + {% for post in page.posts %} +
  • + + {{ post.title }} +
  • + {% endfor %} +
+ +
+
+
+
+
+ Image +
+
+

{{ site.title }}

+

{{ site.description }}

+ Back to Overview +
+
+ {% include javascripts.html %}{% include footer.html %} + + + \ No newline at end of file