views: set twitter:title, og:title on all pages.
This commit is contained in:
@@ -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 %>
|
||||
|
||||
@@ -159,7 +159,6 @@
|
||||
<meta name="post-id" content="<%= @post.id %>">
|
||||
<meta name="post-has-embedded-notes" content="<%= @post.has_embedded_notes? %>">
|
||||
<meta name="always-resize-images" content="<%= CurrentUser.user.always_resize_images? %>">
|
||||
<%= tag.meta name: "og:title", content: "#{@post.presenter.humanized_essential_tag_string} - #{Danbooru.config.app_name}" %>
|
||||
|
||||
<% if @post.visible? %>
|
||||
<%= tag.meta name: "og:image", content: @post.open_graph_image_url %>
|
||||
@@ -175,7 +174,6 @@
|
||||
<% if @post.twitter_card_supported? %>
|
||||
<meta name="twitter:card" content="summary_large_image">
|
||||
<%= tag.meta name: "twitter:site", content: Danbooru.config.twitter_site %>
|
||||
<%= tag.meta name: "twitter:title", content: "#{@post.presenter.humanized_essential_tag_string} - #{Danbooru.config.app_name}" %>
|
||||
<%= tag.meta name: "twitter:description", content: "View this #{@post.image_width}x#{@post.image_height} #{number_to_human_size(@post.file_size)} image" %>
|
||||
|
||||
<% if @post.visible? %>
|
||||
|
||||
Reference in New Issue
Block a user