Browse Source

WSRF-244 - Staging environment fixes (Docs - General performance improvements) (#2006)

pull/2018/head
Glenn Penridge 4 years ago
committed by tylerkelly13
parent
commit
eebb023583
  1. 1
      .gitignore
  2. 2
      _includes/template/bodycontents.html
  3. 2
      _includes/template/head.html
  4. 28
      _scripts/build.sh

1
.gitignore

@ -5,6 +5,7 @@ _data/nav_api.*
_site
_config-prod.yml
_config-local.yml
_config-environment.yml
node_modules
api
vendor

2
_includes/template/bodycontents.html

@ -216,7 +216,7 @@
{% include js/prettier_changelog.js %}
</script>
{% endif %}
{% include_remote {{ site.origin }}/_docs/footer.html css="body > *" %}
{% include_remote {{ site.origin }}/_docs/footer.html %}
<script src="{{ site.shared_baseurl }}{{ site.baseurl }}/scripts/common.min.js"></script>
<script src="{{ site.shared_baseurl }}{{ site.baseurl }}/scripts/docs.min.js"></script>

2
_includes/template/head.html

@ -15,7 +15,7 @@
<link href="https://cdn.jsdelivr.net/npm/docsearch.js@2/dist/cdn/docsearch.min.css" rel="stylesheet" media="print" onload="this.media='all'; this.onload=null;"/>
<link href="{{ site.shared_baseurl }}{{ site.baseurl }}/css/common.min.css" rel="stylesheet">
{% include_remote {{ site.origin }}/_docs/head.html css="head > *" %}
{% include_remote {{ site.origin }}/_docs/head.html %}
{% assign tinymce_script_tag_included = false %}

28
_scripts/build.sh

@ -2,12 +2,30 @@
set -e
BASEURL="$(_scripts/get-baseurl.sh)"
BASE_URL="$(_scripts/get-baseurl.sh)"
STAGING_ORIGIN="https://www.staging.tiny.cloud"
echo -e "\n > setting baseurl to: $BASEURL"
echo "baseurl: \"$BASEURL\"" > _config-prod.yml
echo -e "\n > setting base url to: $BASE_URL"
echo "baseurl: \"$BASE_URL\"" > _config-environment.yml
echo -e " > builidng documentation\n"
bundle exec jekyll build --config _config.yml,_config-prod.yml
#
# Due to how the workflow for docs builds runs in Wercker, we have
# to check specifically for the develop branch to override the
# origin -- we need to do this for the template imports on the
# head, footer and newsletter parts of the docs.
#
if [[ -z "${WERCKER_GIT_BRANCH}" ]]; then
echo -e " > local build - using default origin in config.yml"
else
if [[ $WERCKER_GIT_BRANCH = "develop" ]]; then
echo -e " > staging build - setting origin to: $STAGING_ORIGIN"
echo "origin: \"$STAGING_ORIGIN\"" >> _config-environment.yml
else
echo -e " > production/feature branch build - using default origin in config.yml"
fi
fi
echo -e " > building documentation\n"
bundle exec jekyll build --config _config.yml,_config-environment.yml
echo ""
Loading…
Cancel
Save