seo: update JSON-LD site metadata.

* Add the Danbooru logo and social media links to the Organization data.
  This is to make Danbooru eligible for Google's knowledge panel ([1], [2]).
* Only include this metadata on the frontpage as per Google's recommendations ([3]).

[1]: https://support.google.com/knowledgepanel/answer/9163198
[2], https://developers.google.com/search/docs/data-types/logo
[3]: https://developers.google.com/search/docs/data-types/sitelinks-searchbox
This commit is contained in:
evazion
2020-07-03 16:04:13 -05:00
parent a0ee4c67a8
commit b6b0218e1d
5 changed files with 67 additions and 36 deletions

View File

@@ -355,6 +355,11 @@ module Danbooru
nil
end
def twitter_url
return nil unless Danbooru.config.twitter_username.present?
"https://twitter.com/#{Danbooru.config.twitter_username}"
end
# include essential tags in image urls (requires nginx/apache rewrites)
def enable_seo_post_urls
false