This is an automated email from the ASF dual-hosted git repository. gcruz pushed a commit to branch gc/8477 in repository https://gitbox.apache.org/repos/asf/allura.git
commit bcc34ce4df4777b12bd4ed4135d67a51628c70b4 Author: Guillermo Cruz <[email protected]> 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(
