diff --git a/_config.yml b/_config.yml
index 081b481..d0ac3f2 100644
--- a/_config.yml
+++ b/_config.yml
@@ -25,6 +25,20 @@ previous_page: '← Vorige pagina'
next_page: 'Volgende pagina →'
mentioned_in: 'Komt voor in:'
+# collections
+collections:
+ gallery:
+ output: true
+ permalink: /:collection/:name/
+
+# defaults
+defaults:
+ -
+ scope:
+ type: gallery
+ values:
+ layout: gallery-list
+
# other
gems: [jekyll-paginate]
markdown: rdiscount
@@ -32,4 +46,5 @@ rdiscount:
extensions: [smart]
exclude:
- LICENSE
-- README
\ No newline at end of file
+- README
+array: []
\ No newline at end of file
diff --git a/_includes/caption.html b/_includes/caption.html
index e47bf3f..22727ea 100644
--- a/_includes/caption.html
+++ b/_includes/caption.html
@@ -1,5 +1,9 @@
+ {% if include.link %}
+

+ {% else %}

+ {% endif %}
{% if include.text %}
{{ include.text | markdownify | hyphenate }}
{% endif %}
diff --git a/_includes/gallery-list.html b/_includes/gallery-list.html
new file mode 100644
index 0000000..d2bf10f
--- /dev/null
+++ b/_includes/gallery-list.html
@@ -0,0 +1,11 @@
+
+{% for p in site.pages %}
+ {% if p.layout == 'gallery-photo' and p.gallery == gallery %}
+
+
+
+
+
+ {% endif %}
+{% endfor %}
+
diff --git a/_includes/gallery.html b/_includes/gallery.html
index c486d49..2da2170 100644
--- a/_includes/gallery.html
+++ b/_includes/gallery.html
@@ -1,4 +1,7 @@
-{% capture path %}gallery/{{ include.gallery }}{% endcapture %}
- {% loopdir path:path match:"*.md" sort:"ordering" %}

{% endloopdir %}
+{% for p in site.pages %}
+ {% if p.layout == 'gallery-photo' and p.gallery == include.gallery %}
+

+ {% endif %}
+{% endfor %}
\ No newline at end of file
diff --git a/_includes/gallery_list.html b/_includes/gallery_list.html
deleted file mode 100644
index 2c77175..0000000
--- a/_includes/gallery_list.html
+++ /dev/null
@@ -1,4 +0,0 @@
-
- {% capture path %}gallery/{{ include.gallery }}{% endcapture %}
- {% loopdir path:path match:"*.md" sort:"ordering" %}

{% endloopdir %}
-
diff --git a/_includes/gallery_list640w.html b/_includes/gallery_list640w.html
deleted file mode 100644
index 27d721e..0000000
--- a/_includes/gallery_list640w.html
+++ /dev/null
@@ -1,2 +0,0 @@
-{% capture path %}gallery/{{ include.gallery }}{% endcapture %}
-{% loopdir path:path match:"*.md" sort:"ordering" %}

{% endloopdir %}
diff --git a/_includes/photo.html b/_includes/photo.html
index e2ed500..6a3ba07 100644
--- a/_includes/photo.html
+++ b/_includes/photo.html
@@ -1,6 +1,8 @@
-{% capture image %}/asset/gallery/{{ include.album }}/{{ include.photo }}~640w.jpg{% endcapture %}
+{% capture image %}/asset/gallery/{{ include.gallery }}/{{ include.photo }}~640w.jpg{% endcapture %}
+{% capture link %}/{{ site.baseurl }}/gallery/{{ include.gallery }}/{{ include.photo }}.html{% endcapture %}
{% include caption.html
width='600'
image=image
text=include.text
+ link=link
%}
\ No newline at end of file
diff --git a/_includes/post_detail.html b/_includes/post-detail.html
similarity index 100%
rename from _includes/post_detail.html
rename to _includes/post-detail.html
diff --git a/_layouts/gallery-list.html b/_layouts/gallery-list.html
index dd3dbc0..73d74a8 100644
--- a/_layouts/gallery-list.html
+++ b/_layouts/gallery-list.html
@@ -11,34 +11,33 @@ layout: default
- {{ content }}
+ {{ content }}
{% if false != page.slideshow %}
[ slideshow ]
{% endif %}
- {% if false != page.slideshow and false != page.map %}
+ {% if false != page.slideshow and page.map %}
|
{% endif %}
- {% if false != page.map %}
+ {% if page.map %}
[ map ]
{% endif %}
- {% include gallery_list.html gallery=gallery %}
- {% capture list %}
- {% for post in site.posts %}
- {% if post.content contains gallery %}
-
- {{ post.title }}
-
+ {% assign items = site.array %}
+ {% for p in site.posts %}
+ {% if p.content contains gallery %}
+ {% assign items = items | push:p %}
{% endif %}
{% endfor %}
- {% endcapture %}
- {% if list %}
+ {% if items | size > 0 %}
{{ site.mentioned_in }}
{% endif %}
+ {% include gallery-list.html gallery=gallery %}
{% if false != page.comments %}
{% include disqus.html %}
{% endif %}
-
+
\ No newline at end of file
diff --git a/_layouts/gallery-map.html b/_layouts/gallery-map.html
index a7b5b82..d23b341 100644
--- a/_layouts/gallery-map.html
+++ b/_layouts/gallery-map.html
@@ -1,7 +1,9 @@
---
layout: post
---
-{% capture gallery %}{{ page.url|replace:'/map.html',''|remove_first:'/' }}{% endcapture %}
+
+
\ No newline at end of file
diff --git a/_layouts/gallery-photo.html b/_layouts/gallery-photo.html
index cde88dd..7641a61 100644
--- a/_layouts/gallery-photo.html
+++ b/_layouts/gallery-photo.html
@@ -5,12 +5,16 @@ layout: default
diff --git a/_layouts/gallery-slideshow.html b/_layouts/gallery-slideshow.html
index fb792c9..dc5a925 100644
--- a/_layouts/gallery-slideshow.html
+++ b/_layouts/gallery-slideshow.html
@@ -1,10 +1,10 @@
+{% assign item = site.gallery | where:'name', page.gallery | first %}
- {% capture gallery %}{{ page.url|replace:'/slideshow.html',''|remove_first:'/' }}{% endcapture %}