We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 7efdc74 + e6ce53a commit bef2f41Copy full SHA for bef2f41
app/helpers/application_helper.rb
@@ -21,6 +21,12 @@ def meta_for(content)
21
@keywords = content.node.popular_tags.map &:name
22
@description = content.title
23
@dont_index = true if content.node.score < 0
24
+ published_at = content.node.try(:created_at) || DateTime.now()
25
+ # For all content recently published, ask robots to not index it if
26
+ # a minimum score is not reached during the first 24 hours.
27
+ # The threshold is set to the one used by moderated News, so the moderated
28
+ # content can still be fastly indexed by robots.
29
+ @dont_index ||= true if published_at > DateTime.now() - 24.hour && content.node.score <= News.accept_threshold
30
end
31
32
0 commit comments