Skip to content

Commit

Permalink
Add robots "noindex, nofollow" to deleted and banned post pages.
Browse files Browse the repository at this point in the history
  • Loading branch information
chromakode committed Dec 1, 2011
1 parent 7ac293d commit 50c51c2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion r2/r2/lib/pages/pages.py
Original file line number Diff line number Diff line change
Expand Up @@ -847,7 +847,8 @@ def __init__(self, link = None, comment = None,
else:
self.duplicates = duplicates

Reddit.__init__(self, title = title, short_description=short_description, *a, **kw)
robots = "noindex,nofollow" if link._deleted or link._spam else None
Reddit.__init__(self, title = title, short_description=short_description, robots=robots, *a, **kw)

def build_toolbars(self):
base_path = "/%s/%s/" % (self.link._id36, title_to_url(self.link.title))
Expand Down

0 comments on commit 50c51c2

Please sign in to comment.