Refactor seo.html and support OpenGraph image overrides (#1321)
- Refactor seo.html include and add `page.header.og_image` override - DRY up handling of page images (`page.header.image`, `page.header.overlay_image`, `page.header.teaser`, and `site.og_image`). - Allow page images to be set with `header.og_image` page variable in YAML Front Matter as per feature request in #1316. - Add sample posts for testing `og_image` override - Set author bio as site OpenGraph default image - Document `page.header.og_image` OpenGraph override - Update CHANGELOG and history Close #1316
This commit is contained in:
22
test/_posts/2010-08-05-post-header-image-og-override.md
Normal file
22
test/_posts/2010-08-05-post-header-image-og-override.md
Normal file
@ -0,0 +1,22 @@
|
||||
---
|
||||
title: "Post: Header Image with OpenGraph Override"
|
||||
header:
|
||||
image: /assets/images/page-header-image.png
|
||||
og_image: /assets/images/page-header-og-image.png
|
||||
categories:
|
||||
- Layout
|
||||
- Uncategorized
|
||||
tags:
|
||||
- edge case
|
||||
- image
|
||||
- layout
|
||||
last_modified_at: 2017-10-26T15:12:19-04:00
|
||||
---
|
||||
|
||||
This post has a header image with an OpenGraph override.
|
||||
|
||||
```yaml
|
||||
header:
|
||||
image: /assets/images/page-header-image.png
|
||||
og_image: /assets/images/page-header-og-image.png
|
||||
```
|
@ -0,0 +1,26 @@
|
||||
---
|
||||
title: "Post: Overlay Image with OpenGraph Override"
|
||||
header:
|
||||
overlay_image: /assets/images/unsplash-image-1.jpg
|
||||
og_image: /assets/images/page-header-og-image.png
|
||||
caption: "Photo credit: [**Unsplash**](https://unsplash.com)"
|
||||
cta_url: "https://unsplash.com"
|
||||
categories:
|
||||
- Layout
|
||||
- Uncategorized
|
||||
tags:
|
||||
- edge case
|
||||
- image
|
||||
- layout
|
||||
last_modified_at: 2017-10-26T15:12:19-04:00
|
||||
---
|
||||
|
||||
This post has a header image with an OpenGraph override.
|
||||
|
||||
```yaml
|
||||
header:
|
||||
overlay_image: /assets/images/unsplash-image-1.jpg
|
||||
og_image: /assets/images/page-header-og-image.png
|
||||
caption: "Photo credit: [**Unsplash**](https://unsplash.com)"
|
||||
cta_url: "https://unsplash.com"
|
||||
```
|
22
test/_posts/2010-08-05-post-teaser-image-og-override.md
Normal file
22
test/_posts/2010-08-05-post-teaser-image-og-override.md
Normal file
@ -0,0 +1,22 @@
|
||||
---
|
||||
title: "Post: Teaser Image with OpenGraph Override"
|
||||
header:
|
||||
teaser: /assets/images/page-header-teaser.png
|
||||
og_image: /assets/images/page-header-og-image.png
|
||||
categories:
|
||||
- Layout
|
||||
- Uncategorized
|
||||
tags:
|
||||
- edge case
|
||||
- image
|
||||
- layout
|
||||
last_modified_at: 2017-10-26T15:12:19-04:00
|
||||
---
|
||||
|
||||
This post has a teaser image with an OpenGraph override.
|
||||
|
||||
```yaml
|
||||
header:
|
||||
teaser: /assets/images/page-header-teaser.png
|
||||
og_image: /assets/images/page-header-og-image.png
|
||||
```
|
Reference in New Issue
Block a user