2017-05-25 13:50:01 +00:00
|
|
|
## Usage
|
|
|
|
|
2020-06-28 14:42:57 +00:00
|
|
|
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):
|
2017-05-25 13:50:01 +00:00
|
|
|
|
2020-06-28 14:42:57 +00:00
|
|
|
* `title` - Your site's title (e.g., *Ben's Awesome Site*, *The GitHub Blog*, etc.), used as part of the title tag like
|
|
|
|
`Home | Ben's Awesome Site`.
|
|
|
|
* `tagline` - A short description (e.g., *A blog dedicated to reviewing cat gifs*), used as part of the title tag like
|
|
|
|
`Ben's Awesome Site | A blog dedicated to reviewing cat gifs` instead of `Ben's Awesome Site | Long description about a
|
|
|
|
blog dedicated to reviewing cat gifs` that would be used when `page.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 own `description`, and also as part of the page's title tag if neither `page.title` nor `site.tagline`
|
|
|
|
has been defined.
|
2017-05-25 13:50:01 +00:00
|
|
|
* `url` - The full URL to your site. Note: `site.github.url` will be used by default.
|
2018-03-24 08:05:42 +00:00
|
|
|
* `author` - global author information (see [Advanced usage](advanced-usage.md#author-information))
|
2018-05-03 00:04:19 +00:00
|
|
|
* `twitter` - The following properties are available:
|
|
|
|
* `twitter:card` - The site's default card type
|
2020-06-28 14:42:57 +00:00
|
|
|
* `twitter:username` - The site's Twitter handle.
|
|
|
|
|
|
|
|
You'll want to describe them like so:
|
2017-05-25 13:50:01 +00:00
|
|
|
|
|
|
|
```yml
|
|
|
|
twitter:
|
|
|
|
username: benbalter
|
2018-05-11 01:26:35 +00:00
|
|
|
card: summary
|
|
|
|
```
|
2017-05-25 13:50:01 +00:00
|
|
|
* `facebook` - The following properties are available:
|
|
|
|
* `facebook:app_id` - a Facebook app ID for Facebook insights
|
|
|
|
* `facebook:publisher` - a Facebook page URL or ID of the publishing entity
|
|
|
|
* `facebook:admins` - a Facebook user ID for domain insights linked to a personal account
|
|
|
|
|
|
|
|
You'll want to describe one or more like so:
|
|
|
|
|
2018-05-11 01:27:40 +00:00
|
|
|
```yml
|
2017-05-25 13:50:01 +00:00
|
|
|
facebook:
|
|
|
|
app_id: 1234
|
|
|
|
publisher: 1234
|
|
|
|
admins: 1234
|
2018-05-11 01:27:40 +00:00
|
|
|
```
|
2020-06-28 14:42:57 +00:00
|
|
|
* `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 the `logo` field is not validated, you will find errors inherent to the publisher in the
|
2020-07-24 18:34:17 +00:00
|
|
|
[Rich Results Testing Tool](https://search.google.com/test/rich-results)
|
2020-06-28 14:42:57 +00:00
|
|
|
* `social` - For [specifying social profiles](https://developers.google.com/search/docs/guides/enhance-site#add-your-sites-name-logo-and-social-links).
|
|
|
|
The following properties are available:
|
2017-05-25 13:50:01 +00:00
|
|
|
* `name` - If the user or organization name differs from the site's name
|
|
|
|
* `links` - An array of links to social media profiles.
|
|
|
|
|
|
|
|
```yml
|
|
|
|
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
|
2018-05-11 01:27:40 +00:00
|
|
|
```
|
2020-06-16 16:46:24 +00:00
|
|
|
* `google_site_verification` for verifying ownership via Google Search Console
|
2017-05-25 13:50:01 +00:00
|
|
|
* Alternatively, verify ownership with several services at once using the following format:
|
2020-06-28 14:42:57 +00:00
|
|
|
```yml
|
|
|
|
webmaster_verifications:
|
|
|
|
google: 1234
|
|
|
|
bing: 1234
|
|
|
|
alexa: 1234
|
|
|
|
yandex: 1234
|
|
|
|
baidu: 1234
|
2021-10-28 16:59:07 +00:00
|
|
|
facebook: 1234
|
2020-06-28 14:42:57 +00:00
|
|
|
```
|
2020-10-08 14:42:00 +00:00
|
|
|
* `locale` - The locale these tags are marked up in. Of the format `language_TERRITORY`. Default is `en_US`. Takes priority
|
|
|
|
over existing config key `lang`.
|
2017-05-25 13:50:01 +00:00
|
|
|
|
|
|
|
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 document
|
|
|
|
* `description` - A short description of the page's content
|
|
|
|
* `image` - URL to an image associated with the post, page, or document (e.g., `/assets/page-pic.jpg`)
|
2018-03-24 08:05:42 +00:00
|
|
|
* `author` - Page-, post-, or document-specific author information (see [Advanced usage](advanced-usage.md#author-information))
|
2020-10-08 14:42:00 +00:00
|
|
|
* `locale` - Page-, post-, or document-specific locale information. Takes priority over existing front matter attribute `lang`.
|
2018-05-11 01:27:40 +00:00
|
|
|
|
2018-05-03 00:04:19 +00:00
|
|
|
*Note:* Front matter defaults can be used for any of the above values as described in advanced usage with an image example.
|