diff options
author | Micah Lee <micah@micahflee.com> | 2020-09-03 11:52:02 -0700 |
---|---|---|
committer | Micah Lee <micah@micahflee.com> | 2020-09-03 11:52:02 -0700 |
commit | 023bb8d7ac73b34bc6d05bcf72037b4897f4e53b (patch) | |
tree | 68e559f58fc04ca41d6fd58c5b9367fb54188ff4 /docs/build.sh | |
parent | 5e53c0441b201a958493534f72bade67779757a4 (diff) | |
download | onionshare-023bb8d7ac73b34bc6d05bcf72037b4897f4e53b.tar.gz onionshare-023bb8d7ac73b34bc6d05bcf72037b4897f4e53b.zip |
Remove languages from index of docs, and make docs build.sh build a different set of docs for each version
Diffstat (limited to 'docs/build.sh')
-rwxr-xr-x | docs/build.sh | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/docs/build.sh b/docs/build.sh index 7ab1a5a4..da24dc6f 100755 --- a/docs/build.sh +++ b/docs/build.sh @@ -1,7 +1,10 @@ #!/bin/bash +VERSION=`cat ../share/version.txt` + # Supported locales -LOCALES="ar ca zh_CN zh_TW da nl en fr de el is ga it ja nb fa pl pt_BR pt_PT ro ru sr@latin es sv te tr uk" +#LOCALES="ar ca zh_CN zh_TW da nl en fr de el is ga it ja nb fa pl pt_BR pt_PT ro ru sr@latin es sv te tr uk" +LOCALES="ar ca da nl en" # Generate English .po files make gettext @@ -14,16 +17,19 @@ for LOCALE in $LOCALES; do done # Build all locales -rm -rf build/html build/localized_html > /dev/null -mkdir -p build/localized_html +rm -rf build/html build/docs > /dev/null +mkdir -p build/docs/$VERSION make html -mv build/html build/localized_html/en +mv build/html build/docs/$VERSION/en for LOCALE in $LOCALES; do make -e SPHINXOPTS="-D language='$LOCALE'" html - mv build/html build/localized_html/$LOCALE + mv build/html build/docs/$VERSION/$LOCALE done # Redirect to English by default -echo '<html><head><meta http-equiv="refresh" content="0; url=en/" /><script>document.location="en/"</script></head></html>' > build/localized_html/index.html
\ No newline at end of file +echo '<html><head><meta http-equiv="refresh" content="0; url=en/" /><script>document.location="en/"</script></head></html>' > build/docs/$VERSION/index.html + +# Redirect to latest version +echo '<html><head><meta http-equiv="refresh" content="0; url='$VERSION'/en/" /><script>document.location="'$VERSION'/en/"</script></head></html>' > build/docs/index.html
\ No newline at end of file |