Merge pull request #3089 from evazion/fix-3081

Fix #3081: ATOM discovery link issues.
This commit is contained in:
Albert Yi
2017-05-24 15:38:38 -07:00
committed by GitHub
3 changed files with 5 additions and 2 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

@@ -43,6 +43,8 @@
<% end %>
<%= content_for(:html_header) do %>
<%= auto_discovery_link_tag(:atom, {format: :atom}, {title: @forum_topic.title}) %>
<script>
$(function() {
$("#new-response-link").click(function(e) {
@@ -57,5 +59,3 @@
});
</script>
<% end %>
<% content_for(:html_header, auto_discovery_link_tag(:atom, forum_topics_url(@forum_topic, :atom), title: @forum_topic.title)) %>

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" %>