Small fix to build script
This commit is contained in:
parent
a3c6ac05df
commit
c8ba8a2c36
1 changed files with 10 additions and 1 deletions
|
@ -1,5 +1,5 @@
|
||||||
#! /bin/bash
|
#! /bin/bash
|
||||||
|
: '
|
||||||
echo "Starting build.Should"
|
echo "Starting build.Should"
|
||||||
# The build script; we build the application step by step as building everything at once takes too much RAM
|
# 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
|
# Should be run from the repository root
|
||||||
|
@ -32,3 +32,12 @@ do
|
||||||
# npm run generate && node --max_old_space_size=12000 $(which parcel) build
|
# npm run generate && node --max_old_space_size=12000 $(which parcel) build
|
||||||
parcel build --public-url './' --no-source-maps "$theme.html"
|
parcel build --public-url './' --no-source-maps "$theme.html"
|
||||||
done
|
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!<meta content="\([^"]\+\)" property="og:image">!<meta content="./\1" property="og:image">!' $file
|
||||||
|
sed -i 's!<meta property="og:image" content="\([^"]\+\)">!<meta content="./\1" property="og:image">!' $file
|
||||||
|
done
|
Loading…
Reference in a new issue