diff --git a/.gitignore b/.gitignore
index 39a9279d0e91814eb5eea7fc8b17e5578f2112c5..356db705d845fcc8ef47af03dfc75f8192eacda9 100644
--- a/.gitignore
+++ b/.gitignore
@@ -39,9 +39,8 @@ Thumbs.db
 .komodotools
 *.komodoproject
 
-# Jekyll metadata and extra config file for `github` script
+# Jekyll metadata
 docs/.jekyll-metadata
-twbsconfig.yml
 
 # Folders to ignore
 node_modules
diff --git a/package.json b/package.json
index d23e86b5233b05e6d7ccfc09d4f2e6c58fa039e6..fbb238adcd9a035f22c36ba172e4ed79a6d1d488 100644
--- a/package.json
+++ b/package.json
@@ -62,15 +62,15 @@
     "docs": "npm-run-all --parallel css-docs js-docs --sequential docs-compile docs-lint",
     "docs-compile": "bundle exec jekyll build",
     "postdocs-compile": "npm run docs-workbox-precache",
-    "docs-github": "shx echo \"github: true\" > twbsconfig.yml && npm run docs-compile -- --config _config.yml,twbsconfig.yml && shx rm ./twbsconfig.yml",
-    "docs-github-serve": "npm run docs-serve -- --skip-initial-build --no-watch",
+    "docs-production": "cross-env JEKYLL_ENV=production npm run docs-compile",
     "docs-lint": "npm-run-all docs-lint-*",
     "docs-lint-htmllint": "htmllint --rc build/.htmllintrc \"_gh_pages/**/*.html\" \"js/tests/**/*.html\"",
     "docs-lint-vnu-jar": "node build/vnu-jar.js",
     "docs-serve": "bundle exec jekyll serve",
+    "docs-serve-only": "npm run docs-serve -- --skip-initial-build --no-watch",
     "docs-workbox-precache": "node build/workbox.js",
     "update-deps": "ncu -a -x jquery -x bundlesize && npm update && bundle update && shx echo Manually update \"site/docs/4.1/assets/js/vendor/\"",
-    "release": "npm run dist && npm run release-sri && npm run release-zip && npm run docs-github",
+    "release": "npm run dist && npm run release-sri && npm run release-zip && npm run docs-production",
     "release-sri": "node build/generate-sri.js",
     "release-version": "node build/change-version.js",
     "release-zip": "cross-env-shell \"shx rm -rf bootstrap-$npm_package_version-dist && shx cp -r dist/ bootstrap-$npm_package_version-dist && zip -r9 bootstrap-$npm_package_version-dist.zip bootstrap-$npm_package_version-dist && shx rm -rf bootstrap-$npm_package_version-dist\"",
diff --git a/site/_includes/header.html b/site/_includes/header.html
index b92a5790a0f2718b7a47355a9e5f9f9dbb72a141..11265478d2f585484d02fd39d213c254afd5e2b1 100644
--- a/site/_includes/header.html
+++ b/site/_includes/header.html
@@ -13,7 +13,7 @@
 </title>
 
 <!-- Bootstrap core CSS -->
-{% if site.github %}
+{% if jekyll.environment == "production" %}
 <link href="{{ site.baseurl }}/docs/{{ site.docs_version }}/dist/css/bootstrap.min.css" rel="stylesheet" integrity="{{ site.cdn.css_hash }}" crossorigin="anonymous">
 {% else %}
 <link href="{{ site.baseurl }}/docs/{{ site.docs_version }}/dist/css/bootstrap.css" rel="stylesheet">
diff --git a/site/_includes/scripts.html b/site/_includes/scripts.html
index 2bd5ec8bcc0bd277f1e01caacd3b34f8e1e070f8..74d6f9ef2e1eb317bf49201544bb7c8b2405ce4d 100644
--- a/site/_includes/scripts.html
+++ b/site/_includes/scripts.html
@@ -1,7 +1,7 @@
 <script src="{{ site.cdn.jquery }}" integrity="{{ site.cdn.jquery_hash }}" crossorigin="anonymous"></script>
 <script>window.jQuery || document.write('<script src="{{ site.baseurl }}/assets/js/vendor/jquery-slim.min.js"><\/script>')</script>
 
-{%- if site.github -%}
+{%- if jekyll.environment == "production" -%}
   <script src="{{ site.baseurl }}/docs/{{ site.docs_version }}/dist/js/bootstrap.bundle.min.js" integrity="{{ site.cdn.js_bundle_hash }}" crossorigin="anonymous"></script>
 {%- else -%}
   <script src="{{ site.baseurl }}/docs/{{ site.docs_version }}/dist/js/bootstrap.bundle.js"></script>
@@ -11,7 +11,7 @@
 <script src="https://cdn.jsdelivr.net/npm/docsearch.js@2/dist/cdn/docsearch.min.js"></script>
 {%- endif -%}
 
-{%- if site.github -%}
+{%- if jekyll.environment == "production" -%}
   <script src="{{ site.baseurl }}/docs/{{ site.docs_version }}/assets/js/docs.min.js"></script>
 {%- else -%}
   <script src="{{ site.baseurl }}/docs/{{ site.docs_version }}/assets/js/vendor/anchor.min.js"></script>