diff options
author | Marcin Chrzanowski <m@m-chrzan.xyz> | 2021-09-12 14:17:19 +0200 |
---|---|---|
committer | Marcin Chrzanowski <m@m-chrzan.xyz> | 2021-09-12 14:17:19 +0200 |
commit | f3039744d72454e7e3b8cb1032266bcc172ce488 (patch) | |
tree | 5a92a698056e2cbec6f0b121a9ce31596e4a4581 /lib/html.rb |
Initial commit
Diffstat (limited to 'lib/html.rb')
-rw-r--r-- | lib/html.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/html.rb b/lib/html.rb new file mode 100644 index 0000000..61e25a3 --- /dev/null +++ b/lib/html.rb @@ -0,0 +1,13 @@ +require './lib/templated' + +def render_html song + template = html_template 'song' + template.result binding +end + +def make_htmls songs + songs.each do |song_id, song| + content = render_html song + write_templated content, song_html(song_id), song.title + end +end |