3.8 KiB
Usage
The SEO tag will respect any of the following if included in your site's _config.yml
(and simply not include them if
they're not defined):
-
title
- Your site's title (e.g., Ben's Awesome Site, The GitHub Blog, etc.), used as part of the title tag likeHome | Ben's Awesome Site
. -
tagline
- A short description (e.g., A blog dedicated to reviewing cat gifs), used as part of the title tag likeBen's Awesome Site | A blog dedicated to reviewing cat gifs
instead ofBen's Awesome Site | Long description about a blog dedicated to reviewing cat gifs
that would be used whenpage.title
is not defined. -
description
- A longer description used for the description meta tag. Also used as fallback for pages that don't provide their owndescription
, and also as part of the page's title tag if neitherpage.title
norsite.tagline
has been defined. -
url
- The full URL to your site. Note:site.github.url
will be used by default. -
author
- global author information (see Advanced usage) -
twitter
- The following properties are available:twitter:card
- The site's default card typetwitter:username
- The site's Twitter handle.
You'll want to describe them like so:
twitter: username: benbalter card: summary
-
facebook
- The following properties are available:facebook:app_id
- a Facebook app ID for Facebook insightsfacebook:publisher
- a Facebook page URL or ID of the publishing entityfacebook:admins
- a Facebook user ID for domain insights linked to a personal account
You'll want to describe one or more like so:
facebook: app_id: 1234 publisher: 1234 admins: 1234
-
logo
- URL to a site-wide logo (e.g.,/assets/your-company-logo.png
) - If you would like the "publisher" property to be present, you must add this field to your site's configuration, during the validation of the structured data by Google Search Console, if thelogo
field is not validated, you will find errors inherent to the publisher in the Rich Results Testing Tool -
social
- For specifying social profiles. The following properties are available:name
- If the user or organization name differs from the site's namelinks
- An array of links to social media profiles.
social: name: Ben Balter links: - https://twitter.com/BenBalter - https://www.facebook.com/ben.balter - https://www.linkedin.com/in/BenBalter - https://github.com/benbalter - https://keybase.io/benbalter
-
google_site_verification
for verifying ownership via Google Search Console -
Alternatively, verify ownership with several services at once using the following format:
webmaster_verifications: google: 1234 bing: 1234 alexa: 1234 yandex: 1234 baidu: 1234 facebook: 1234
-
locale
- The locale these tags are marked up in. Of the formatlanguage_TERRITORY
. Default isen_US
. Takes priority over existing config keylang
.
The SEO tag will respect the following YAML front matter if included in a post, page, or document:
title
- The title of the post, page, or documentdescription
- A short description of the page's contentimage
- URL to an image associated with the post, page, or document (e.g.,/assets/page-pic.jpg
)author
- Page-, post-, or document-specific author information (see Advanced usage)locale
- Page-, post-, or document-specific locale information. Takes priority over existing front matter attributelang
.
Note: Front matter defaults can be used for any of the above values as described in advanced usage with an image example.