-
Notifications
You must be signed in to change notification settings - Fork 89
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fixes to redirect issues in deployment
- Loading branch information
1 parent
13a6e7c
commit 9d81301
Showing
3 changed files
with
105 additions
and
79 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,24 @@ | ||
{% extends "!page.html" %} | ||
|
||
{% block meta %} | ||
<!-- Custom canonical link & redirect --> | ||
<!-- Custom canonical link and redirect logic --> | ||
<link rel="canonical" href="{{ book_baseurl }}/{{ pagename }}/"> | ||
<script>location="{{ book_baseurl }}/{{ pagename }}/"</script> | ||
<script> | ||
location.href = "{{ book_baseurl }}/{{ pagename }}/"; | ||
</script> | ||
<meta http-equiv="refresh" content="0; url={{ book_baseurl }}/{{ pagename }}/"> | ||
<meta name="robots" content="noindex"> | ||
|
||
{{ super() }} {# Keep other meta tags the theme provides #} | ||
{{ super() }} {# Retain any additional meta tags provided by the theme #} | ||
{% endblock meta %} | ||
|
||
{% block main %} | ||
<!-- Optional message for those who aren't auto-redirected --> | ||
<h1>Redirecting…</h1> | ||
<!-- Optional message for users who are not automatically redirected --> | ||
<h1>Redirecting...</h1> | ||
<p> | ||
<a href="{{ book_baseurl }}/{{ pagename }}/"> | ||
Click here if you are not redirected. | ||
</a> | ||
If you are not redirected automatically, please | ||
<a href="{{ book_baseurl }}/{{ pagename }}/">click here</a>. | ||
</p> | ||
|
||
{{ super() }} {# Keep the normal page content #} | ||
{{ super() }} {# Retain the normal page content provided by the theme #} | ||
{% endblock main %} |