From d148eeb4a46cb647d13d451cb01cdc66835d2b03 Mon Sep 17 00:00:00 2001 From: Kévin Le Gouguec Date: Wed, 10 Mar 2021 23:28:39 +0100 Subject: Add links from/to English pages --- build.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'build.sh') diff --git a/build.sh b/build.sh index a9035f3..583bda0 100755 --- a/build.sh +++ b/build.sh @@ -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='\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} -- cgit v1.2.3