Rename .Params.featured_image to .Params.featuredImage Front Matter param

This commit is contained in:
Serghei Iakovlev 2022-07-13 01:34:57 +02:00
parent e94f38a2a6
commit 26d53eef3a
No known key found for this signature in database
GPG key ID: C6AF1016BBDEA800
5 changed files with 9 additions and 7 deletions
CHANGELOG.md
archetypes
layouts/partials

View file

@ -21,6 +21,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
framework from `layouts/partials/scripts.html` to `layouts/partials/seo/ga.html`
- Use Google Site Tag tagging/analytics framework on production mode only
- Rename `.Params.caption` to `.Params.pageTitle` Front Matter param
- Rename `.Params.featured_image` to `.Params.featuredImage` Front Matter param
### Removed

View file

@ -2,7 +2,7 @@
title: "{{ replace .File.ContentBaseName "-" " " | title }}"
date: {{ .Date }}
draft: true
featured_image: ""
featuredImage: ""
description: ""
rights: ""
author: ""

View file

@ -19,8 +19,8 @@
"@type": "WebPage",
"@id": {{ .Permalink }}
},
"headline": {{ partial "title.html" . | htmlUnescape }},{{ if .Params.featured_image }}
{{ $image := .Resources.GetMatch .Params.featured_image -}}
"headline": {{ partial "title.html" . | htmlUnescape }},{{ if .Params.featuredImage }}
{{ $image := .Resources.GetMatch .Params.featuredImage -}}
"image": [
{{ $image.Permalink }}
],{{ end }}

View file

@ -6,8 +6,8 @@
{{- $logo := resources.Get (site.Params.assets.logo | default "/img/open-graph-logo.png" ) -}}
{{- if and .IsPage .Params.featured_image -}}
{{- $image := .Resources.GetMatch .Params.featured_image }}
{{- if and .IsPage .Params.featuredImage -}}
{{- $image := .Resources.GetMatch .Params.featuredImage }}
<meta property="og:image" content="{{ $image.Permalink }}">
<meta property="og:image:width" content="{{ $image.Width }}">
<meta property="og:image:height" content="{{ $image.Height }}">

View file

@ -9,8 +9,8 @@
{{- $logo := resources.Get (site.Params.assets.logo | default "/img/open-graph-logo.png" ) -}}
{{- if and .IsPage .Params.featured_image }}
{{- $image := .Resources.GetMatch .Params.featured_image }}
{{- if and .IsPage .Params.featuredImage }}
{{- $image := .Resources.GetMatch .Params.featuredImage }}
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:image" content="{{ $image.Permalink }}">
{{- else }}