Merge pull request #11 from ZeusWPI/verenigingen-json
Add verenigingen.json generation
This commit is contained in:
commit
93c6f8e33e
4 changed files with 17 additions and 2 deletions
8
Rules
8
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
|
||||
|
|
1
content/verenigingen.json.erb
Normal file
1
content/verenigingen.json.erb
Normal file
|
@ -0,0 +1 @@
|
|||
<%= verenigingen.to_json %>
|
|
@ -11,4 +11,12 @@ module VerenigingenHelper
|
|||
def konvents
|
||||
@items.find_all("**/verenigingen/*").map{|x| x[:konvent]}.uniq.compact
|
||||
end
|
||||
end
|
||||
def verenigingen
|
||||
@items.find_all("**/verenigingen/*").map{|x| {
|
||||
"titel" => x[:titel],
|
||||
"naam" => x[:naam],
|
||||
"konvent" => x[:konvent],
|
||||
"themas" => x[:themas]
|
||||
}}.to_a
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue