1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-03 09:49:20 +02:00

Render CSS/title/description tags on server side

This commit is contained in:
Chocobozzz 2018-07-18 09:52:46 +02:00
parent 1d94c15468
commit e032aec9b9
No known key found for this signature in database
GPG key ID: 583A612D890159BE
10 changed files with 290 additions and 174 deletions

View file

@ -10,16 +10,19 @@ defaultLanguage="en_US"
npm run ng build -- --output-path "dist/$defaultLanguage/" --deploy-url "/client/$defaultLanguage/" --prod --stats-json
mv "./dist/$defaultLanguage/assets" "./dist"
# Supported languages
languages=("fr_FR" "eu_ES" "ca_ES" "cs_CZ" "eo")
# Don't build other languages if --light arg is provided
if [ -z ${1+x} ] || [ "$1" != "--light" ]; then
# Supported languages
languages=("fr_FR" "eu_ES" "ca_ES" "cs_CZ" "eo")
for lang in "${languages[@]}"; do
npm run ng build -- --prod --i18n-file "./src/locale/target/angular_$lang.xml" --i18n-format xlf --i18n-locale "$lang" \
--output-path "dist/$lang/" --deploy-url "/client/$lang/"
for lang in "${languages[@]}"; do
npm run ng build -- --prod --i18n-file "./src/locale/target/angular_$lang.xml" --i18n-format xlf --i18n-locale "$lang" \
--output-path "dist/$lang/" --deploy-url "/client/$lang/"
# Do no duplicate assets
rm -r "./dist/$lang/assets"
done
# Do no duplicate assets
rm -r "./dist/$lang/assets"
done
fi
NODE_ENV=production npm run webpack -- --config webpack/webpack.video-embed.js --mode production --json > "./dist/embed-stats.json"