Skip to content
This repository was archived by the owner on Jun 7, 2023. It is now read-only.

Commit 8c97c9e

Browse files
committed
New: construct canonical link
A canonical link improves analytics by eliminating duplicates
1 parent 18b4c24 commit 8c97c9e

File tree

1 file changed

+4
-0
lines changed
  • runestone/common/project_template/_templates/plugin_layouts/sphinx_bootstrap

1 file changed

+4
-0
lines changed

runestone/common/project_template/_templates/plugin_layouts/sphinx_bootstrap/layout.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,10 @@
230230
<link rel="shortcut icon" href="/{{appname}}/static/favicon.ico" type="image/ico" />
231231
{% endif %}
232232

233+
{% raw %}
234+
<link rel="canonical" href="https://{{canonical_host}}{{new_server_prefix}}/books/published/{{base_course}}/{{pagepath}}" />
235+
{% endraw %}
236+
233237
<script>
234238
eBookConfig = {};
235239
{% if dynamic_pages == 'True' %}

0 commit comments

Comments
 (0)