aboutsummaryrefslogtreecommitdiffhomepage
path: root/site/_layouts
diff options
context:
space:
mode:
authorGravatar dzc <dzc@google.com>2017-06-23 08:26:15 +0200
committerGravatar Marcel Hlopko <hlopko@google.com>2017-06-26 18:31:01 +0200
commit1d8cd59173e9c1e2fd7fd03dd4b2a0ae8a35ef4b (patch)
tree9fa2e8667ffd10f26ff5137c5697b50a7905bc2b /site/_layouts
parentf8e5e0d3ac189b314e99450b806d1b52cfdd62ad (diff)
Rework jekyll-tree build to add redirects from site root.
As described in the commit message for 5596d3b, the new docs.bazel.build site will have one directory per released version and a master directory for the latest documentation at HEAD. This change reworks the jekyll-tree script to construct a final Jekyll tree containing the documentation at HEAD with documentation under /versions/master and redirect pages at the site root for each documentation page. TESTED=scripts/serve-docs.sh RELNOTES: None PiperOrigin-RevId: 159920553
Diffstat (limited to 'site/_layouts')
-rw-r--r--site/_layouts/redirect.html4
-rw-r--r--site/_layouts/regular-redirect.html7
2 files changed, 2 insertions, 9 deletions
diff --git a/site/_layouts/redirect.html b/site/_layouts/redirect.html
index d2fb13ac48..2418143677 100644
--- a/site/_layouts/redirect.html
+++ b/site/_layouts/redirect.html
@@ -1,7 +1,7 @@
<html>
<head>
<script>
- window.location.replace("/versions/{{ site.default_version }}/{{ page.redirect }}" + window.location.hash);
+ window.location.replace("{{ page.redirect }}" + window.location.hash);
</script>
</head>
-</html>
+</html> \ No newline at end of file
diff --git a/site/_layouts/regular-redirect.html b/site/_layouts/regular-redirect.html
deleted file mode 100644
index 2418143677..0000000000
--- a/site/_layouts/regular-redirect.html
+++ /dev/null
@@ -1,7 +0,0 @@
-<html>
- <head>
- <script>
- window.location.replace("{{ page.redirect }}" + window.location.hash);
- </script>
- </head>
-</html> \ No newline at end of file