add additional meta tags for seo
This commit is contained in:
@@ -22,6 +22,8 @@ module Downloads
|
||||
end
|
||||
|
||||
def is_cloudflare?
|
||||
return false if ENV["SKIP_CLOUDFLARE_CHECK"]
|
||||
|
||||
Cache.get("is_cloudflare:#{file_url.origin}", 4.hours) do
|
||||
res = HTTParty.head(file_url, httparty_options)
|
||||
raise Error.new("HTTP error code: #{res.code} #{res.message}") unless res.success?
|
||||
|
||||
@@ -36,6 +36,10 @@ module PostSets
|
||||
false
|
||||
end
|
||||
|
||||
def best_post
|
||||
nil
|
||||
end
|
||||
|
||||
def presenter
|
||||
raise NotImplementedError
|
||||
end
|
||||
|
||||
@@ -26,7 +26,7 @@ module PostSets
|
||||
end
|
||||
|
||||
def has_wiki?
|
||||
is_single_tag? && ::WikiPage.titled(tag_string).exists? && wiki_page.visible?
|
||||
is_single_tag? && ::WikiPage.titled(tag_string).exists? && wiki_page.visible? && wiki_page.body.present?
|
||||
end
|
||||
|
||||
def has_blank_wiki?
|
||||
@@ -184,5 +184,10 @@ module PostSets
|
||||
def presenter
|
||||
@presenter ||= ::PostSetPresenters::Post.new(self)
|
||||
end
|
||||
|
||||
def best_post
|
||||
# be smarter about this in the future
|
||||
posts[0]
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user