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 2017/09/06 15:03:28 UTC

allura git commit: Use nofollow on raw (download) and mode switching links, to reduce crawling within repos a little bit

Repository: allura
Updated Branches:
  refs/heads/master 3fcf40e92 -> db492249a


Use nofollow on raw (download) and mode switching links, to reduce crawling within repos a little bit


Project: http://git-wip-us.apache.org/repos/asf/allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/allura/commit/db492249
Tree: http://git-wip-us.apache.org/repos/asf/allura/tree/db492249
Diff: http://git-wip-us.apache.org/repos/asf/allura/diff/db492249

Branch: refs/heads/master
Commit: db492249a487dfd7619f485c1c325675b7a5d403
Parents: 3fcf40e
Author: Dave Brondsema <da...@brondsema.net>
Authored: Tue Sep 5 17:27:37 2017 -0400
Committer: Dave Brondsema <da...@brondsema.net>
Committed: Tue Sep 5 17:27:37 2017 -0400

----------------------------------------------------------------------
 Allura/allura/templates/repo/commit.html      | 4 ++--
 Allura/allura/templates/repo/diff.html        | 2 +-
 Allura/allura/templates/repo/file.html        | 8 ++++----
 Allura/allura/templates/repo/tarball.html     | 2 +-
 Allura/allura/templates/widgets/repo/log.html | 2 +-
 5 files changed, 9 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/allura/blob/db492249/Allura/allura/templates/repo/commit.html
----------------------------------------------------------------------
diff --git a/Allura/allura/templates/repo/commit.html b/Allura/allura/templates/repo/commit.html
index fea7979..37c8754 100644
--- a/Allura/allura/templates/repo/commit.html
+++ b/Allura/allura/templates/repo/commit.html
@@ -148,7 +148,7 @@ Commit <a href="{{commit.url()}}">{{commit.shorthand_id()}}</a> {{commit_labels(
                 {% if obj_type != 'tree' and is_text %}
                     {% set diff_url = file_url + '?barediff=' + (prev[0]._id if prev else '') %}
                     <a class="commit-diff-link" href="{{ diff_url.replace('?barediff=', '?diff=') }}">Diff</a>
-                    <a class="commit-diff-link switch-diff-format-link" data-diformat="{{session.diformat}}" data-diffid="diff-{{loop.index}}" href="{{ diff_url }}">Switch to {{'unified' if session.diformat == 'sidebyside' else 'side-by-side'}} view</a>
+                    <a class="commit-diff-link switch-diff-format-link" rel="nofollow" data-diformat="{{session.diformat}}" data-diffid="diff-{{loop.index}}" href="{{ diff_url }}">Switch to {{'unified' if session.diformat == 'sidebyside' else 'side-by-side'}} view</a>
                 {% endif %}
             {% elif type == 'removed' %}
                 {% set file_url = prev[0].url() + 'tree/' + h.urlquote(h.really_unicode(file)) %}
@@ -161,7 +161,7 @@ Commit <a href="{{commit.url()}}">{{commit.shorthand_id()}}</a> {{commit_labels(
                 {% if file.ratio != 1 %}
                     {% set diff_url = new_file_url + '?barediff=' + (prev[0]._id if prev else '') + '&prev_file=' + h.urlquote(h.really_unicode(file['old'])) %}
                     <a class="commit-diff-link" href="{{ diff_url.replace('?barediff=', '?diff=') }}">Diff</a>
-                    <a class="commit-diff-link switch-diff-format-link" data-diformat="{{session.diformat}}" data-diffid="diff-{{loop.index}}" href="{{diff_url}}">Switch to {{'unified' if session.diformat == 'sidebyside' else 'side-by-side'}} view</a>
+                    <a class="commit-diff-link switch-diff-format-link" rel="nofollow" data-diformat="{{session.diformat}}" data-diffid="diff-{{loop.index}}" href="{{diff_url}}">Switch to {{'unified' if session.diformat == 'sidebyside' else 'side-by-side'}} view</a>
                 {% endif %}
             {% endif %}
             </h6>

http://git-wip-us.apache.org/repos/asf/allura/blob/db492249/Allura/allura/templates/repo/diff.html
----------------------------------------------------------------------
diff --git a/Allura/allura/templates/repo/diff.html b/Allura/allura/templates/repo/diff.html
index 0984889..87ad53b 100644
--- a/Allura/allura/templates/repo/diff.html
+++ b/Allura/allura/templates/repo/diff.html
@@ -60,7 +60,7 @@
           {% set switch_url = request.url.replace('&diformat=regular', '') + '&diformat=sidebyside' %}
           {% set switch_text = 'side-by-side' %}
         {% endif %}
-        <a href="{{ switch_url }}">Switch to {{ switch_text }} view</a>
+        <a rel="nofollow" href="{{ switch_url }}">Switch to {{ switch_text }} view</a>
       </h3>
     {% if session.diformat == 'sidebyside' %}
       {{diff|safe}}

http://git-wip-us.apache.org/repos/asf/allura/blob/db492249/Allura/allura/templates/repo/file.html
----------------------------------------------------------------------
diff --git a/Allura/allura/templates/repo/file.html b/Allura/allura/templates/repo/file.html
index 90413ec..1f8be04 100644
--- a/Allura/allura/templates/repo/file.html
+++ b/Allura/allura/templates/repo/file.html
@@ -74,10 +74,10 @@
 {% endblock %}
 {% block content %}
   {% if blob.has_image_view %}
-    <p><a href="?format=raw">Download this file</a></p>
+    <p><a rel="nofollow" href="?format=raw">Download this file</a></p>
     <img src="?format=raw" alt=""/>
   {% elif blob.has_html_view or blob.has_pypeline_view or force_display %}
-    <p><a href="?format=raw">Download this file</a></p>
+    <p><a rel="nofollow" href="?format=raw">Download this file</a></p>
     <div class="clip grid-19 codebrowser">
       <h3>
         {{ stats.line_count }} lines ({{ stats.data_line_count }} with data), {{ stats.code_size|filesizeformat }}
@@ -90,7 +90,7 @@
     </div>
   {% else %}
     <p>{{h.really_unicode(blob.name)}} is not known to be viewable in your browser.
-    Try to <a href="?force=True">display it</a> anyway or
-    <a href="?format=raw">download it</a> instead.</p>
+    Try to <a rel="nofollow" href="?force=True">display it</a> anyway or
+    <a rel="nofollow" href="?format=raw">download it</a> instead.</p>
   {% endif %}
 {% endblock %}

http://git-wip-us.apache.org/repos/asf/allura/blob/db492249/Allura/allura/templates/repo/tarball.html
----------------------------------------------------------------------
diff --git a/Allura/allura/templates/repo/tarball.html b/Allura/allura/templates/repo/tarball.html
index 0de0011..55bb3ae 100644
--- a/Allura/allura/templates/repo/tarball.html
+++ b/Allura/allura/templates/repo/tarball.html
@@ -76,7 +76,7 @@ Commit <a href="{{commit.url()}}">{{commit.shorthand_id()}}</a> {{commit_labels(
 <div id='snapshot_status'>
     <img src="{{g.forge_static('images/spinner.gif')}}" class="spinner" style="display:none"/>
     <h2 class="busy ready">Generating snapshot...</h2>
-    <h2 class="complete">Your download will begin shortly, or use this <a href="{{c.app.repo.tarball_url(revision, path)}}">direct link</a>.</h2>
+    <h2 class="complete">Your download will begin shortly, or use this <a rel="nofollow" href="{{c.app.repo.tarball_url(revision, path)}}">direct link</a>.</h2>
     <form action="tarball" method="post" class="None">
       <p>We're having trouble finding that snapshot. Would you like to resubmit?</p>
       <input type="hidden" name="path" value="{{path}}" />

http://git-wip-us.apache.org/repos/asf/allura/blob/db492249/Allura/allura/templates/widgets/repo/log.html
----------------------------------------------------------------------
diff --git a/Allura/allura/templates/widgets/repo/log.html b/Allura/allura/templates/widgets/repo/log.html
index 8b9d547..d2f884c 100644
--- a/Allura/allura/templates/widgets/repo/log.html
+++ b/Allura/allura/templates/widgets/repo/log.html
@@ -74,7 +74,7 @@
               </a>
               {%if is_file%}
               <br/>
-              <a class="download" href="{{app.repo.url_for_commit(commit.id)}}tree{{path}}?format=raw">Download</a>
+              <a class="download" rel="nofollow" href="{{app.repo.url_for_commit(commit.id)}}tree{{path}}?format=raw">Download</a>
               {%endif%}
               {% if commit.rename_details %}
                   {%set path=commit.rename_details['path']%}