diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb
index 242cbc151..9a52e69b6 100644
--- a/app/helpers/application_helper.rb
+++ b/app/helpers/application_helper.rb
@@ -297,6 +297,10 @@ module ApplicationHelper
end
end
+ def atom_feed_tag(title, url = {})
+ content_for(:html_header, auto_discovery_link_tag(:atom, url, title: title))
+ end
+
def show_moderation_notice?
CurrentUser.can_approve_posts? && (cookies[:moderated].blank? || Time.at(cookies[:moderated].to_i) < 72.hours.ago)
end
diff --git a/app/views/comments/_index_by_comment.html.erb b/app/views/comments/_index_by_comment.html.erb
index 478c06557..8acbeeda9 100644
--- a/app/views/comments/_index_by_comment.html.erb
+++ b/app/views/comments/_index_by_comment.html.erb
@@ -16,5 +16,3 @@
<%= numbered_paginator(@comments) %>
-
-<% content_for(:html_header, auto_discovery_link_tag(:atom, comments_url(format: "atom"), title: "Comments")) %>
diff --git a/app/views/comments/_index_by_post.html.erb b/app/views/comments/_index_by_post.html.erb
index 551f63c2b..29acbe032 100644
--- a/app/views/comments/_index_by_post.html.erb
+++ b/app/views/comments/_index_by_post.html.erb
@@ -1,5 +1,3 @@
-<% meta_description "See comments on #{Danbooru.config.app_name}." %>
-
<% if !CurrentUser.user.is_builder? %>
@@ -24,5 +22,3 @@
<%= numbered_paginator(@posts) %>
-
-<% content_for(:html_header, auto_discovery_link_tag(:atom, comments_url(:atom, search: { do_not_bump_post: true }), title: "Comments")) %>
diff --git a/app/views/comments/index.html.erb b/app/views/comments/index.html.erb
index c473d03cd..56b62ba3c 100644
--- a/app/views/comments/index.html.erb
+++ b/app/views/comments/index.html.erb
@@ -1,3 +1,8 @@
+<% meta_description "See comments on #{Danbooru.config.app_name}." %>
+
+<% atom_feed_tag "Comments", comments_url(:atom, search: params.fetch(:search, {}).permit!) %>
+<%= render "secondary_links" %>
+
-
-<%= render "secondary_links" %>
diff --git a/app/views/forum_topics/index.html.erb b/app/views/forum_topics/index.html.erb
index 3c6560e35..ba4393780 100644
--- a/app/views/forum_topics/index.html.erb
+++ b/app/views/forum_topics/index.html.erb
@@ -1,4 +1,6 @@
<% page_title "Forum" %>
+
+<% atom_feed_tag "Forum Topics", forum_topics_url(:atom, search: params.fetch(:search, {}).permit!) %>
<%= render "secondary_links" %>
@@ -19,5 +21,3 @@
<%= numbered_paginator(@forum_topics) %>
-
-<% content_for(:html_header, auto_discovery_link_tag(:atom, forum_topics_url(:atom), title: "Forum Topics")) %>
diff --git a/app/views/forum_topics/show.html.erb b/app/views/forum_topics/show.html.erb
index 71f98afcf..03b0bc11d 100644
--- a/app/views/forum_topics/show.html.erb
+++ b/app/views/forum_topics/show.html.erb
@@ -1,6 +1,9 @@
<% page_title @forum_topic.title %>
<% meta_description(DText.excerpt(@forum_topic.original_post&.body)) %>
+<% atom_feed_tag(@forum_topic.title, forum_topic_url(@forum_topic.id, format: :atom)) %>
+<%= render "secondary_links" %>
+