diff --git a/scripts/build.sh b/scripts/build.sh index 605a678ee0..9d8f67a3f8 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -1,5 +1,5 @@ #! /bin/bash - +: ' echo "Starting build.Should" # The build script; we build the application step by step as building everything at once takes too much RAM # Should be run from the repository root @@ -31,4 +31,13 @@ do # Builds the necessary files for just one theme, e.g. 'bookcases.html' + 'index_bookcases.ts' + supporting file # npm run generate && node --max_old_space_size=12000 $(which parcel) build parcel build --public-url './' --no-source-maps "$theme.html" +done +' +# At last: a workaround; parcel 1.x borks the link to social images; the public-URL (./) is setup incorrectly, so we fix those +cd dist +echo -e "Fixing social images..." +for file in $(ls *.html) +do + sed -i 's!!!' $file + sed -i 's!!!' $file done \ No newline at end of file