m-chrzan.xyz
aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcin Chrzanowski <m@m-chrzan.xyz>2021-09-12 21:40:25 +0200
committerMarcin Chrzanowski <m@m-chrzan.xyz>2021-09-12 21:42:01 +0200
commit1d288cae171b2dd6fa225ff59797c2668e03870e (patch)
treeea54ab6de1fcaf897a42158426f8e5a7f4abc49f
parent236cbc380efbf1e36f8b31511b59298747acc0b1 (diff)
Add songbook to index
-rw-r--r--lib/latex.rb2
-rw-r--r--scripts/build.rb1
-rw-r--r--src/index.html.erb8
3 files changed, 9 insertions, 2 deletions
diff --git a/lib/latex.rb b/lib/latex.rb
index fa1094c..2adcb82 100644
--- a/lib/latex.rb
+++ b/lib/latex.rb
@@ -27,7 +27,7 @@ def render_songbook songs
system "lualatex --shell-escape -output-directory=#{TmpDir}/ #{tmp 'songbook.tex'}"
# compile twice for table of contents to generate properly
system "lualatex --shell-escape -output-directory=#{TmpDir}/ #{tmp 'songbook.tex'}"
- system "mv #{tmp 'songbook.pdf'} #{build 'songbook.pdf'}"
+ system "mv #{tmp 'songbook.pdf'} #{build 'śpiewnik-tradycyjny.pdf'}"
end
def make_pdfs songs
diff --git a/scripts/build.rb b/scripts/build.rb
index bbefac4..04e39d7 100644
--- a/scripts/build.rb
+++ b/scripts/build.rb
@@ -20,6 +20,7 @@ P = Pather.new
P.add 'index', 'index.html'
P.add 'style', 'style.css'
+P.add 'songbook', 'śpiewnik-tradycyjny.pdf'
songs.each_key do |song_id|
P.add(song_html(song_id), song_html(song_id))
diff --git a/src/index.html.erb b/src/index.html.erb
index 3748018..8d62de7 100644
--- a/src/index.html.erb
+++ b/src/index.html.erb
@@ -1,4 +1,10 @@
-Śpiewnik polskiej muzyki tradycyjnej.
+<p>
+ Śpiewnik polskiej muzyki tradycyjnej.
+</p>
+
+<p>
+ Pobierz cały śpiewnik: <a href='<%= path_to 'songbook' %>'>[PDF]</a>.
+</p>
<ul id='songs'>
<%- songs.keys.sort.each do |song_id| -%>