From 046e3c9906999cd43e074472461c0800f787b234 Mon Sep 17 00:00:00 2001 From: Marcin Chrzanowski Date: Sun, 15 Dec 2019 14:41:07 +0100 Subject: Add RSS feed --- lib/templated.rb | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'lib') diff --git a/lib/templated.rb b/lib/templated.rb index a7e0d63..9323903 100644 --- a/lib/templated.rb +++ b/lib/templated.rb @@ -7,6 +7,12 @@ def write_templated_file content_filename, options write_templated content, content_filename, options end +def write_erb erb_filename + content = ERB.new(File.read(src erb_filename)).result + cut_filename = erb_filename.sub /\.erb$/, '' + File.write build(cut_filename), content +end + def write_templated_erb erb_filename, options content = ERB.new(File.read(src erb_filename)).result cut_filename = erb_filename.sub /\.erb$/, '' -- cgit v1.2.3