mirror of
https://git.coop/cotech/website.git
synced 2024-11-30 17:53:07 +00:00
11 lines
312 B
Ruby
11 lines
312 B
Ruby
require_relative 'coop'
|
|
require 'erb'
|
|
|
|
Coop.all.each do |coop|
|
|
output_fn = File.join(File.dirname(__FILE__), '..', '_coops', coop.slug + '.md')
|
|
|
|
renderer = ERB.new(File.read('coop.erb.md'), nil, '<>')
|
|
result = renderer.result(coop.erb_binding)
|
|
File.open(output_fn, 'w') { |file| file.write(result) }
|
|
end
|