Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Section template
- tpl = File.read 'section-tpl.txt'
- ['list', 'of', 'section', 'names'].each do |name|
- # Replaces [name] with the section name, you can expand on this...
- liquid = tpl.gsub '[name]', name
- # Create sections/(name).liquid
- File.open "sections/#{name}.liquid", 'w' do |f|
- f.write liquid
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement