/posts/$id: add feed discovery link for comments on post.

This commit is contained in:
evazion
2017-05-24 15:51:25 -05:00
parent f93cd11fb5
commit ea80d51ecf
2 changed files with 3 additions and 0 deletions

View File

@@ -2,6 +2,7 @@ atom_feed do |feed|
title = "Comments"
title += " by #{params[:search][:creator_name]}" if params.dig(:search, :creator_name).present?
title += " on #{params[:search][:post_tags_match]}" if params.dig(:search, :post_tags_match).present?
title += " on post ##{params[:search][:post_id]}" if params.dig(:search, :post_id).present?
feed.title(title)
feed.updated(@comments.first.try(:updated_at))

View File

@@ -175,6 +175,8 @@
<meta name="twitter:description" content="<%= @post.presenter.humanized_tag_string %> - <%= Danbooru.config.app_name %>">
<meta name="twitter:image" content="http://<%= Danbooru.config.hostname %><%= @post.large_file_url %>">
<% end %>
<%= auto_discovery_link_tag(:atom, comments_url(:atom, search: { post_id: @post.id }), title: "Comments for post ##{@post.id}") %>
<% end %>
<%= render "posts/partials/common/secondary_links" %>