views: refactor atom feed links.

* Fix comment & forum feeds to include search params.
* Remove global post feeds (only include post feeds on post index).
This commit is contained in:
evazion
2020-01-26 16:54:34 -06:00
parent 815703a922
commit c36c0b9e7a
11 changed files with 21 additions and 20 deletions

View File

@@ -1,9 +1,13 @@
<% if @post_set.is_empty_tag? %>
<% page_title("#{Danbooru.config.app_name}: Anime Image Board", suffix: nil) %>
<% meta_description("#{Danbooru.config.canonical_app_name} is the original anime image 'booru. Find over 3.75 million anime pictures categorized by over 100 million tags.") %>
<% atom_feed_tag "Posts", posts_url(format: :atom) %>
<% else %>
<% page_title("#{@post_set.humanized_tag_string} Art") %>
<% meta_description("See over #{number_with_delimiter(@post_set.post_count)} #{@post_set.humanized_tag_string} images on #{Danbooru.config.app_name}. #{DText.excerpt(@post_set.wiki_page&.body)}") %>
<% atom_feed_tag "Posts: #{@post_set.tag_string}", posts_url(tags: @post_set.tag_string, format: :atom) %>
<% end %>
<%= tag.link href: posts_path(format: "atom", tags: params[:tags]), rel: "alternate", title: "ATOM", type: "application/atom+xml" %>

View File

@@ -1,6 +1,7 @@
<% page_title @post.presenter.humanized_essential_tag_string %>
<% meta_description "View this #{@post.image_width}x#{@post.image_height} #{number_to_human_size(@post.file_size)} image" %>
<% atom_feed_tag "Comments for post ##{@post.id}", comments_url(:atom, search: { post_id: @post.id }) %>
<%= render "posts/partials/common/secondary_links" %>
<% content_for(:sidebar) do %>
@@ -187,6 +188,4 @@
<%= tag.meta name: "og:type", content: "website" %>
<%= tag.meta name: "og:site", content: Danbooru.config.app_name %>
<%= auto_discovery_link_tag(:atom, comments_url(:atom, search: { post_id: @post.id }), title: "Comments for post ##{@post.id}") %>
<% end %>