You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by di...@apache.org on 2022/11/28 17:40:38 UTC
[allura] branch master updated: [#8477] canonical tag included for add_project and pages inside the code tool
This is an automated email from the ASF dual-hosted git repository.
dill0wn pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/allura.git
The following commit(s) were added to refs/heads/master by this push:
new 267fd4159 [#8477] canonical tag included for add_project and pages inside the code tool
267fd4159 is described below
commit 267fd4159005887e430973ed501dc9b30a80b040
Author: Guillermo Cruz <gu...@slashdotmedia.com>
AuthorDate: Thu Nov 10 14:56:10 2022 -0700
[#8477] canonical tag included for add_project and pages inside the code tool
---
Allura/allura/templates/neighborhood_add_project.html | 5 +++++
Allura/allura/templates/repo/repo_master.html | 5 +++++
Allura/allura/tests/functional/test_neighborhood.py | 1 +
3 files changed, 11 insertions(+)
diff --git a/Allura/allura/templates/neighborhood_add_project.html b/Allura/allura/templates/neighborhood_add_project.html
index e6a70d4a9..436c07f33 100644
--- a/Allura/allura/templates/neighborhood_add_project.html
+++ b/Allura/allura/templates/neighborhood_add_project.html
@@ -16,9 +16,14 @@
specific language governing permissions and limitations
under the License.
-#}
+{% from 'allura:templates/jinja_master/lib.html' import canonical_tag %}
{% set hide_left_bar = True %}
{% extends g.theme.master %}
+{% block head %}
+ {{ canonical_tag() }}
+{% endblock %}
+
{% block title %}{{neighborhood.name}} / Create a Project{% endblock %}
{% block header %}Create a Project{% endblock %}
diff --git a/Allura/allura/templates/repo/repo_master.html b/Allura/allura/templates/repo/repo_master.html
index e6f5b3a9f..791020d62 100644
--- a/Allura/allura/templates/repo/repo_master.html
+++ b/Allura/allura/templates/repo/repo_master.html
@@ -16,8 +16,13 @@
specific language governing permissions and limitations
under the License.
-#}
+{% from 'allura:templates/jinja_master/lib.html' import canonical_tag %}
{% extends g.theme.master %}
+{% block head %}
+ {{ canonical_tag() }}
+{% endblock %}
+
{% if hasattr(c.app, 'repo') %}
{% set repo = c.app.repo %}
{% else %}
diff --git a/Allura/allura/tests/functional/test_neighborhood.py b/Allura/allura/tests/functional/test_neighborhood.py
index 90ab50c10..482c097f0 100644
--- a/Allura/allura/tests/functional/test_neighborhood.py
+++ b/Allura/allura/tests/functional/test_neighborhood.py
@@ -597,6 +597,7 @@ class TestNeighborhood(TestController):
neighborhood = M.Neighborhood.query.get(name='Projects')
neighborhood.features['private_projects'] = False
r = self.app.get('/p/add_project', extra_environ=dict(username='root'))
+ assert 'canonical' in r
assert 'private_project' not in r
r = self.app.post(