<% if @topic_view %>

<%= render_topic_title(@topic_view.topic) %>

<% if @breadcrumbs.present? %>
<% @breadcrumbs.each_with_index do |c, i| %> <%= c[:name] %> <% end %>
<% end %> <% if @tags.present? %>
<% @tags.each_with_index do |tag, i| %> <% if i < @tags.size - 1 %>, <% end %> <% end %>
<% end %>
<%= server_plugin_outlet "topic_header" %> <%- if include_crawler_content? %>
<% if @topic_view.topic.category.present? %> <% end %> '>
<% if application_logo_url.present? %>
<% end %>
<% if @topic_view.posts&.first && !@topic_view.posts.first.is_first_post? %> <% end %> <% @topic_view.posts.each do |post| %> <% if (u = post.user) && !post.hidden && post.cooked && !post.cooked.strip.empty? %>
class='topic-body crawler-post'>
<%= post.hidden ? t('flagging.user_must_edit').html_safe : post.cooked.html_safe %>
<%= post.like_count > 0 ? t('post.has_likes', count: post.like_count) : '' %>
<% if @topic_view.link_counts[post.id] && @topic_view.link_counts[post.id].filter { |l| l[:reflection] }.length > 0 %>
<% @topic_view.link_counts[post.id].each_with_index do |link, i| %> <% if link[:reflection] && link[:title].present? %>
<% end %> <% end %>
<% end %>
<% end %> <% end %>
<% if @topic_view.prev_page || @topic_view.next_page %> <% end %> <%= build_plugin_html 'server:topic-show-after-posts-crawler' %> <% end %> <% content_for :head do %> <%= auto_discovery_link_tag(@topic_view, {action: :feed, slug: @topic_view.topic.slug, topic_id: @topic_view.topic.id}, rel: 'alternate nofollow', title: t('rss_posts_in_topic', topic: @topic_view.title), type: 'application/rss+xml') %> <%= raw crawlable_meta_data(title: @topic_view.title, description: @topic_view.summary(strip_images: true), image: @topic_view.image_url, read_time: @topic_view.read_time, like_count: @topic_view.like_count, ignore_canonical: true, published_time: @topic_view.published_time, breadcrumbs: @breadcrumbs, tags: @tags.map(&:name)) %> <% if @topic_view.prev_page || @topic_view.next_page %> <% if @topic_view.prev_page %> <% end %> <% if @topic_view.next_page %> <% end %> <% end %> <% end %> <% content_for(:title) { @title || "#{gsub_emoji_to_unicode(@topic_view.page_title)} - #{SiteSetting.title}" } %> <% if @topic_view.print %> <% content_for :after_body do %> <%= preload_script('print-page') %> <% end %> <% end %> <% end %>