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

gcruz pushed a commit to branch gc/8521
in repository https://gitbox.apache.org/repos/asf/allura.git

commit 0cf8f8357676c3cf41bd183dc6d565bc6129e8ad
Author: Guillermo Cruz <[email protected]>
AuthorDate: Thu Sep 28 11:34:00 2023 -0600

    8521 noindex on empty tickets pages and added tickets app to be excluded by 
default for site maps
---
 Allura/allura/scripts/create_sitemap_files.py          | 2 +-
 ForgeTracker/forgetracker/templates/tracker/index.html | 3 +++
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/Allura/allura/scripts/create_sitemap_files.py 
b/Allura/allura/scripts/create_sitemap_files.py
index 624f65d09..fc2b630ac 100644
--- a/Allura/allura/scripts/create_sitemap_files.py
+++ b/Allura/allura/scripts/create_sitemap_files.py
@@ -166,7 +166,7 @@ class CreateSitemapFiles(ScriptTask):
                             default=None, nargs='*', metavar='N')
         parser.add_argument('--exclude-tools', dest='exclude_tools',
                             help="URL prefix of excluded neighborhood(s)",
-                            default=['link', 'git', 'hg', 'svn'],
+                            default=['link', 'git', 'hg', 'svn', 'tickets'],
                             nargs='*', metavar='TOOL')
         parser.add_argument('--url-dir', dest='url_dir',
                             default='/allura_sitemap',
diff --git a/ForgeTracker/forgetracker/templates/tracker/index.html 
b/ForgeTracker/forgetracker/templates/tracker/index.html
index 7e15113ef..8466dbe85 100644
--- a/ForgeTracker/forgetracker/templates/tracker/index.html
+++ b/ForgeTracker/forgetracker/templates/tracker/index.html
@@ -23,6 +23,9 @@
 {% block title %}{{c.project.name}} / {{c.app.config.options.mount_label}}{% 
endblock %}
 
 {% block head %}
+   {% if count == 0 %}
+    <meta name="robots" content="noindex, follow">
+  {%  endif %}
   <link rel="alternate" type="application/rss+xml" title="RSS" 
href="feed.rss"/>
   <link rel="alternate" type="application/atom+xml" title="Atom" 
href="feed.atom"/>
   {{ lib.canonical_tag(page) }}

Reply via email to