config: rename twitter_site to twitter_username.
This commit is contained in:
@@ -19,7 +19,7 @@
|
||||
<% if CurrentUser.user.custom_style.present? && params.fetch(:css, "true").truthy? %>
|
||||
<%= stylesheet_link_tag custom_style_users_path(md5: Digest::MD5.hexdigest(CurrentUser.user.custom_style)), media: "screen" %>
|
||||
<% end %>
|
||||
<% if Danbooru.config.twitter_site %>
|
||||
<% if Danbooru.config.twitter_username.present? %>
|
||||
<script type="application/ld+json">
|
||||
{
|
||||
"@context" : "http://schema.org",
|
||||
@@ -27,7 +27,7 @@
|
||||
"name" : "<%= Danbooru.config.app_name %>",
|
||||
"url" : "<%= root_url %>",
|
||||
"sameAs" : [
|
||||
"https://twitter.com/<%= Danbooru.config.twitter_site[1..-1] %>"
|
||||
"https://twitter.com/<%= Danbooru.config.twitter_username %>"
|
||||
]
|
||||
}
|
||||
</script>
|
||||
@@ -70,12 +70,13 @@
|
||||
<%= tag.meta property: "og:description", content: meta_description %>
|
||||
<%= tag.meta property: "og:url", content: request.original_url %>
|
||||
|
||||
<% if Danbooru.config.twitter_site.present? %>
|
||||
<%= tag.meta name: "twitter:site", content: Danbooru.config.twitter_site %>
|
||||
<%= tag.meta name: "twitter:title", content: page_title %>
|
||||
<%= tag.meta name: "twitter:description", content: meta_description %>
|
||||
<% if Danbooru.config.twitter_username.present? %>
|
||||
<%= tag.meta name: "twitter:site", content: "@#{Danbooru.config.twitter_username}" %>
|
||||
<% end %>
|
||||
|
||||
<%= tag.meta name: "twitter:title", content: page_title %>
|
||||
<%= tag.meta name: "twitter:description", content: meta_description %>
|
||||
|
||||
<%= yield :html_header %>
|
||||
<%= raw Danbooru.config.custom_html_header_content %>
|
||||
</head>
|
||||
|
||||
@@ -425,7 +425,9 @@ module Danbooru
|
||||
end
|
||||
end
|
||||
|
||||
def twitter_site
|
||||
# The twitter username associated with this site (username only, don't include the @-sign).
|
||||
def twitter_username
|
||||
nil
|
||||
end
|
||||
|
||||
# include essential tags in image urls (requires nginx/apache rewrites)
|
||||
|
||||
Reference in New Issue
Block a user