diff --git a/Rules b/Rules index 3987b0f..108d27d 100644 --- a/Rules +++ b/Rules @@ -57,9 +57,15 @@ compile '/stylesheets/*.{sass,scss}' do write ext: 'css' end +compile '/*.erb' do + filter :erb + write item.identifier.without_ext +end + +layout '/**/*', :erb + # Catch-all compile '/**/*' do write item.identifier.to_s end -layout '/**/*', :erb diff --git a/content/stuver.erb b/content/stuver.html.erb similarity index 100% rename from content/stuver.erb rename to content/stuver.html.erb diff --git a/content/verenigingen.json.erb b/content/verenigingen.json.erb new file mode 100644 index 0000000..897c519 --- /dev/null +++ b/content/verenigingen.json.erb @@ -0,0 +1 @@ +<%= verenigingen.to_json %> diff --git a/lib/helpers/verenigingen.rb b/lib/helpers/verenigingen.rb index 7ee51a7..7ee4de9 100644 --- a/lib/helpers/verenigingen.rb +++ b/lib/helpers/verenigingen.rb @@ -11,4 +11,12 @@ module VerenigingenHelper def konvents @items.find_all("**/verenigingen/*").map{|x| x[:konvent]}.uniq.compact end - end \ No newline at end of file + def verenigingen + @items.find_all("**/verenigingen/*").map{|x| { + "titel" => x[:titel], + "naam" => x[:naam], + "konvent" => x[:konvent], + "themas" => x[:themas] + }}.to_a + end + end