add more meta descriptions to more pages

This commit is contained in:
r888888888
2016-02-09 14:25:23 -08:00
parent 3354b523e5
commit 1047d1fd2b
7 changed files with 24 additions and 1 deletions

View File

@@ -51,6 +51,10 @@ module ApplicationHelper
DText.parse(text)
end
def strip_dtext(text)
DText.strip(text)
end
def error_messages_for(instance_name)
instance = instance_variable_get("@#{instance_name}")

View File

@@ -15,3 +15,7 @@
<% content_for(:page_title) do %>
Popular - <%= Danbooru.config.app_name %>
<% end %>
<% content_for(:html_header) do %>
<meta name="description" content="The most popular posts per day">
<% end %>

View File

@@ -42,3 +42,7 @@
<% content_for(:page_title) do %>
Pools - <%= Danbooru.config.app_name %>
<% end %>
<% content_for(:html_header) do %>
<meta name="description" content="Pools are groups of posts with something in common. The most common use of pools is for posts that are part of a series (such as a comic, or a group of images released by an artist).">
<% end %>

View File

@@ -27,3 +27,7 @@
<% content_for(:page_title) do %>
Pool - <%= @pool.pretty_name %> - <%= Danbooru.config.app_name %>
<% end %>
<% content_for(:html_header) do %>
<meta name="description" content="<%= strip_dtext(@pool.description) %>">
<% end %>

View File

@@ -57,7 +57,9 @@
<%= content_for(:html_header) do %>
<link href="<%= posts_path(:format => 'atom', :tags => params[:tags]) %>" rel="alternate" title="ATOM" type="application/atom+xml" />
<% if @post_set.has_wiki? %>
<meta name="description" content="<%= @post_set.wiki_page.presenter.blurb %>"></meta>
<meta name="description" content="<%= @post_set.wiki_page.presenter.blurb %>">
<% else %>
<meta name="description" content="<%= Danbooru.config.description %>">
<% end %>
<%= missed_post_search_count_js %>
<% if @post_set.hide_from_crawler? %>

View File

@@ -143,6 +143,7 @@
<% end %>
<% content_for(:html_header) do %>
<meta name="description" content="<%= @post.presenter.humanized_tag_string %>">
<meta name="tags" content="<%= @post.tag_string %>">
<meta name="favorites" content="<%= @post.fav_string %>">
<meta name="pools" content="<%= @post.pool_string %>">

View File

@@ -16,6 +16,10 @@ module Danbooru
end
end
def description
"Find good anime art fast"
end
# The hostname of the server.
def hostname
Socket.gethostname