From d88bb5e0ebb9f614b9d32a24c61ac3819524be57 Mon Sep 17 00:00:00 2001 From: Danny Berger Date: Thu, 18 Dec 2014 09:57:56 -0700 Subject: [PATCH] Add gallery index --- _plugins/loopdir.rb | 2 +- .../index.html | 3 +++ gallery/2014-barcelona-trip/index.html | 3 +++ gallery/2014-colorado-aspens/index.html | 2 ++ gallery/2014-london-iceland-trip/index.html | 5 +++- gallery/index.html | 24 +++++++++++++++++++ 6 files changed, 37 insertions(+), 2 deletions(-) create mode 100644 gallery/index.html diff --git a/_plugins/loopdir.rb b/_plugins/loopdir.rb index efaa9fb..6ce33a0 100644 --- a/_plugins/loopdir.rb +++ b/_plugins/loopdir.rb @@ -66,7 +66,7 @@ module Jekyll end item['name'] = File.basename(pathname, @attributes['match'].sub('*', '')) - item['fullname'] = path + '/' + item['name'] + item['fullname'] = pathname.gsub(/\.[^\.]+$/, '') item['path'] = pathname items.push item diff --git a/gallery/2014-albuquerque-balloon-fiesta/index.html b/gallery/2014-albuquerque-balloon-fiesta/index.html index 89c50a3..e1f2dcd 100644 --- a/gallery/2014-albuquerque-balloon-fiesta/index.html +++ b/gallery/2014-albuquerque-balloon-fiesta/index.html @@ -1,6 +1,9 @@ --- layout: gallery-list title: Albuquerque Balloon Fiesta +date: '2014-10-09' +date_end: '2014-10-13' +highlight_photo: 'f114579-img-1074' --- {% include gallery_list.html gallery='2014-albuquerque-balloon-fiesta' %} diff --git a/gallery/2014-barcelona-trip/index.html b/gallery/2014-barcelona-trip/index.html index f3175fd..7464c0d 100644 --- a/gallery/2014-barcelona-trip/index.html +++ b/gallery/2014-barcelona-trip/index.html @@ -1,6 +1,9 @@ --- layout: gallery-list title : Barcelona Trip +date: '2014-11-16' +date_end: '2014-11-25' +highlight_photo: '106c907-museu-nacional-dart-de-catalunya' ---
diff --git a/gallery/2014-colorado-aspens/index.html b/gallery/2014-colorado-aspens/index.html index 5ce5bb3..8231ab1 100644 --- a/gallery/2014-colorado-aspens/index.html +++ b/gallery/2014-colorado-aspens/index.html @@ -1,6 +1,8 @@ --- layout: gallery-list title: Colorado Aspens +date: '2014-09-27' +highlight_photo: '2dbeedb-aspens-invading' --- {% include gallery_list.html gallery='2014-colorado-aspens' %} diff --git a/gallery/2014-london-iceland-trip/index.html b/gallery/2014-london-iceland-trip/index.html index f7b63d8..9e9807e 100644 --- a/gallery/2014-london-iceland-trip/index.html +++ b/gallery/2014-london-iceland-trip/index.html @@ -1,6 +1,9 @@ --- layout: gallery-list -title : London & Iceland Trip +title: London & Iceland Trip +date: '2014-03-04' +date_end: '2014-03-15' +highlight_photo: 'df5150c-a-classic-view' ---
diff --git a/gallery/index.html b/gallery/index.html new file mode 100644 index 0000000..c51a370 --- /dev/null +++ b/gallery/index.html @@ -0,0 +1,24 @@ +--- +title: 'Galleries' +layout: default +--- + +
+ {% loopdir path:"gallery" match:"*/index.html" sort:"-date" %} +
+ + {{ item.title }} + {{ item.title }} + {% if item.date %}
+ + {% if item.date_end %} + {{ item.date|date:"%B %-d" }} – {{ item.date_end|date:"%-d" }}, {{ item.date|date:"%Y" }} + {% else %} + {{ item.date|date:"%B %-d, %Y" }} + {% endif %} + + {% endif %} +
+
+ {% endloopdir %} +