You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by ke...@apache.org on 2023/04/28 20:36:13 UTC

[allura] 01/01: Make canonical tag on activities pages overridable

This is an automated email from the ASF dual-hosted git repository.

kentontaylor pushed a commit to branch kt/overridable_canonical_activities
in repository https://gitbox.apache.org/repos/asf/allura.git

commit 6d2a2cfd788fbb023577ff5a44f82dd526e0d0a0
Author: Kenton Taylor <kt...@slashdotmedia.com>
AuthorDate: Fri Apr 28 20:35:42 2023 +0000

    Make canonical tag on activities pages overridable
---
 ForgeActivity/forgeactivity/templates/index.html | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ForgeActivity/forgeactivity/templates/index.html b/ForgeActivity/forgeactivity/templates/index.html
index 855b34e2a..3ae11a5ba 100644
--- a/ForgeActivity/forgeactivity/templates/index.html
+++ b/ForgeActivity/forgeactivity/templates/index.html
@@ -24,7 +24,7 @@
     {% if noindex %}
         <meta name="robots" content="noindex, follow">
     {%  endif %}
-    <link rel="canonical" href="{{ request.host_url ~ request.path }}">
+    <link rel="canonical" href="{{ canonical|default or (request.host_url ~ request.path) }}">
 {% endblock %}
 
 {% block title %}{{c.project.name}} Activity{% endblock %}