You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by gc...@apache.org on 2022/06/09 16:45:37 UTC

[allura] branch gc/8439 created (now e38fe466e)

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

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


      at e38fe466e [#8439] added noindex, follow header to searches for Tickets, Block, Wiki and Discussion tools and nofollow to search result links

This branch includes the following new commits:

     new e38fe466e [#8439] added noindex, follow header to searches for Tickets, Block, Wiki and Discussion tools and nofollow to search result links

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[allura] 01/01: [#8439] added noindex, follow header to searches for Tickets, Block, Wiki and Discussion tools and nofollow to search result links

Posted by gc...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit e38fe466e8112925656bb216f42a500d3e4eec07
Author: Guillermo Cruz <gu...@slashdotmedia.com>
AuthorDate: Thu Jun 9 10:45:23 2022 -0600

    [#8439] added noindex, follow header to searches for Tickets, Block, Wiki and Discussion tools and nofollow to search result links
---
 Allura/allura/templates/widgets/search_results.html                  | 2 +-
 ForgeBlog/forgeblog/templates/blog/search.html                       | 4 ++++
 .../forgediscussion/templates/discussionforums/search.html           | 4 ++++
 .../templates/tracker_widgets/ticket_search_results.html             | 5 +++++
 ForgeWiki/forgewiki/templates/wiki/search.html                       | 4 ++++
 5 files changed, 18 insertions(+), 1 deletion(-)

diff --git a/Allura/allura/templates/widgets/search_results.html b/Allura/allura/templates/widgets/search_results.html
index 51d1c5f5e..5e5276278 100644
--- a/Allura/allura/templates/widgets/search_results.html
+++ b/Allura/allura/templates/widgets/search_results.html
@@ -60,7 +60,7 @@
 {% for doc in results %}
   <div class="grid-19">
     <p>
-    <a href="{{doc['url_paginated'] or doc['url_s']}}">
+    <a href="{{doc['url_paginated'] or doc['url_s']}}" rel="nofollow">
       {% if doc.title_match %}
         {{ doc.title_match }}
       {% else %}
diff --git a/ForgeBlog/forgeblog/templates/blog/search.html b/ForgeBlog/forgeblog/templates/blog/search.html
index 76b43720b..a81e74bb0 100644
--- a/ForgeBlog/forgeblog/templates/blog/search.html
+++ b/ForgeBlog/forgeblog/templates/blog/search.html
@@ -20,6 +20,10 @@
 
 {% block title %}{{c.project.name}} / {{c.app.config.options.mount_label}} / Search{% endblock %}
 
+{%  block head %}
+    <meta name="robots" content="noindex, follow">
+{% endblock %}
+
 {% block header %}Search {{c.app.config.options.mount_point}}: {{q}}{% endblock %}
 
 {% block content %}
diff --git a/ForgeDiscussion/forgediscussion/templates/discussionforums/search.html b/ForgeDiscussion/forgediscussion/templates/discussionforums/search.html
index 0fdb640f3..85de03713 100644
--- a/ForgeDiscussion/forgediscussion/templates/discussionforums/search.html
+++ b/ForgeDiscussion/forgediscussion/templates/discussionforums/search.html
@@ -20,6 +20,10 @@
 
 {% block title %}{{c.project.name}} / {{c.app.config.options.mount_label}} / Search{% endblock %}
 
+{% block head %}
+    <meta name="robots" content="noindex, follow">
+{% endblock %}
+
 {% block header %}Search {{c.app.config.options.mount_point}}: {{q}}{% endblock %}
 
 {% block content %}
diff --git a/ForgeTracker/forgetracker/templates/tracker_widgets/ticket_search_results.html b/ForgeTracker/forgetracker/templates/tracker_widgets/ticket_search_results.html
index f57a4662e..192413c7e 100644
--- a/ForgeTracker/forgetracker/templates/tracker_widgets/ticket_search_results.html
+++ b/ForgeTracker/forgetracker/templates/tracker_widgets/ticket_search_results.html
@@ -17,6 +17,11 @@
        under the License.
 -#}
 {% from 'allura:templates/jinja_master/lib.html' import abbr_date with context %}
+{% block head %}
+    {% if 'q=' in request.query_string %}
+        <meta name="robots" content="noindex, follow">
+    {% endif %}
+{% endblock %}
 <div id="ticket_search_results_holder">
   {% if solr_error %}<p>{{solr_error}}</p>{% endif %}
   {{widget.fields['page_size'].display(page=page, count=count, limit=limit)}}
diff --git a/ForgeWiki/forgewiki/templates/wiki/search.html b/ForgeWiki/forgewiki/templates/wiki/search.html
index 6f7085e25..c13f1171b 100644
--- a/ForgeWiki/forgewiki/templates/wiki/search.html
+++ b/ForgeWiki/forgewiki/templates/wiki/search.html
@@ -20,6 +20,10 @@
 
 {% block title %}{{c.project.name}} / {{c.app.config.options.mount_label}} / Search{% endblock %}
 
+{%  block head %}
+    <meta name="robots" content="noindex, follow">
+{% endblock %}
+
 {% block header %}Search {{c.app.config.options.mount_point}}: {{q}}{% endblock %}
 
 {% block wiki_content %}