diff --git a/app/views/posts/partials/index/_seo_meta_tags.html.erb b/app/views/posts/partials/index/_seo_meta_tags.html.erb index 4e7f20e6d..23fbef2c4 100644 --- a/app/views/posts/partials/index/_seo_meta_tags.html.erb +++ b/app/views/posts/partials/index/_seo_meta_tags.html.erb @@ -1,9 +1,4 @@ -<% if @post_set.has_wiki? %> - <% strip_dtext(@post_set.wiki_page.presenter.excerpt).tap do |title| %> - <%= tag.meta name: "og:title", content: title %> - <%= tag.meta name: "twitter:title", content: title %> - <% end %> -<% elsif @post_set.tag_string.present? %> +<% if @post_set.tag_string.present? %> <% "#{@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 %> @@ -25,7 +20,13 @@ <%= tag.meta name: "canonical", content: posts_url(tags: params[:tags], host: Danbooru.config.hostname, protocol: "https") %> -<% if params[:tags].present? %> +<% if @post_set.has_wiki? %> + <% strip_dtext(@post_set.wiki_page.presenter.excerpt).tap do |desc| %> + <%= tag.meta name: "description", content: desc %> + <%= tag.meta name: "og:description", content: desc %> + <%= tag.meta name: "twitter:description", content: desc %> + <% end %> +<% elsif params[:tags].present? %> <% "Find the best art of #{params[:tags].tr('_', ' ').titleize} on #{Danbooru.config.app_name}".tap do |desc| %> <%= tag.meta name: "description", content: desc %> <%= tag.meta name: "og:description", content: desc %>