add additional meta tags for seo

This commit is contained in:
r888888888
2018-10-20 17:15:29 -07:00
parent c301c316bf
commit 192ac128cd
7 changed files with 121 additions and 30 deletions

View File

@@ -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?

View File

@@ -36,6 +36,10 @@ module PostSets
false
end
def best_post
nil
end
def presenter
raise NotImplementedError
end

View File

@@ -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