views: set twitter:title, og:title on all pages.

This commit is contained in:
evazion
2020-01-25 02:36:51 -06:00
parent 6a984de3d5
commit 9f40d31748
4 changed files with 8 additions and 22 deletions

View File

@@ -1,15 +1,3 @@
<% if @post_set.is_single_tag? %>
<% "#{@post_set.humanized_tag_string.titleize} - #{Danbooru.config.app_name}".tap do |title| %>
<%= tag.meta name: "og:title", content: title %>
<%= tag.meta name: "twitter:title", content: title %>
<% end %>
<% else %>
<% "#{@post_set.humanized_tag_string} - #{Danbooru.config.app_name}".tap do |title| %>
<%= tag.meta name: "og:title", content: title %>
<%= tag.meta name: "twitter:title", content: title %>
<% end %>
<% end %>
<% if @post_set.hide_from_crawler? %>
<meta name="robots" content="nofollow,noindex">
<% end %>
@@ -41,4 +29,4 @@
<%= tag.meta name: "twitter:image", content: @post_set.best_post.open_graph_image_url %>
<%= tag.meta name: "og:image", content: @post_set.best_post.open_graph_image_url %>
<%= tag.meta name: "twitter:card", content: "summary_large_image" %>
<% end %>
<% end %>