diff options
| author | Kévin Le Gouguec <kevin.legouguec@gmail.com> | 2021-03-10 23:28:39 +0100 |
|---|---|---|
| committer | Kévin Le Gouguec <kevin.legouguec@gmail.com> | 2021-03-10 23:28:39 +0100 |
| commit | d148eeb4a46cb647d13d451cb01cdc66835d2b03 (patch) | |
| tree | 7d25301eee1714e71570225abee033a5ec81cc0d /build.sh | |
| parent | 9f74233ffedb0609d43d54b6169dc47dd6337803 (diff) | |
| download | quatuorbellefeuille.com-d148eeb4a46cb647d13d451cb01cdc66835d2b03.tar.xz | |
Add links from/to English pages
Diffstat (limited to 'build.sh')
| -rwxr-xr-x | build.sh | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -32,13 +32,20 @@ sed -i s/'{TITLE}'/"${title}"/ ${output} link_stylesheets='' for s in "${stylesheets[@]}" do - spath=$(realpath --relative-to $(dirname "${input}") stylesheets/"${s}".css) + # Prefer relative paths so that drafts under /admin/drafts find + # the correct stylesheets. + # ${input} might be a temporary file; assume ${template} is a + # bona-fide node in our directory hierarchy, and use that to + # compute the path to the stylesheets folder. + spath=$(realpath --relative-to $(dirname "${template}") stylesheets/"${s}".css) link_template='<link rel="stylesheet" href="%s">\n' link_stylesheets+=$(printf "${link_template}" "${spath}") done sed -i /'{STYLESHEETS}'/'c\'"${link_stylesheets}" ${output} +sed -i s/'{TRANSLATION}'/"${translation}"/ ${output} + for transform in "${transforms[@]}" do sed -i "${transform}" ${output} |
