Skip to content

Commit

Permalink
Merge pull request #3719 from davidfischer/davidfischer/bot-promo-clicks
Browse files Browse the repository at this point in the history
Prevent bots indexing promos
  • Loading branch information
ericholscher authored Mar 6, 2018
2 parents e25acfa + 94339b8 commit 78b5781
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions media/robots.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
User-agent: *
Disallow: /builds/
Disallow: /sustainability/click/
2 changes: 2 additions & 0 deletions readthedocs/core/static-src/core/js/sponsorship.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ Promo.prototype.place_promo = function (selector, promo_class) {
.attr('class', 'rtd-pro-image-wrapper')
.attr('href', self.link)
.attr('target', '_blank')
.attr('rel', 'nofollow')
.on('click', self.click_handler);
var promo_image = $('<img />')
.attr('class', 'rtd-pro-image')
Expand All @@ -97,6 +98,7 @@ Promo.prototype.place_promo = function (selector, promo_class) {
.attr('class', 'rtd-pro-link')
.attr('href', self.link)
.attr('target', '_blank')
.attr('rel', 'nofollow')
.on('click', self.click_handler);
});
promo.append(promo_text);
Expand Down
Loading

0 comments on commit 78b5781

Please sign in to comment.