Edit SEO blueprints
This commit is contained in:
parent
816071c3cc
commit
63e3b2dbf7
10 changed files with 129 additions and 183 deletions
|
@ -16,7 +16,7 @@
|
|||
"amteich/kirby-twig": "^4.1",
|
||||
"sylvainjule/matomo": "^1.0",
|
||||
"kirbyzone/sitemapper": "^1.2",
|
||||
"steirico/kirby-plugin-image-crop-field": "^2.0"
|
||||
"mullema/k3-image-clip": "^3.0"
|
||||
},
|
||||
"scripts": {
|
||||
"start": [
|
||||
|
|
152
composer.lock
generated
152
composer.lock
generated
|
@ -4,7 +4,7 @@
|
|||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
"content-hash": "c5992525649c1061a4453492d2f429de",
|
||||
"content-hash": "fac28f73cea5cec843631a10a9a4e395",
|
||||
"packages": [
|
||||
{
|
||||
"name": "amteich/kirby-twig",
|
||||
|
@ -299,65 +299,6 @@
|
|||
],
|
||||
"time": "2020-12-28T12:54:39+00:00"
|
||||
},
|
||||
{
|
||||
"name": "gumlet/php-image-resize",
|
||||
"version": "2.0.2",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/gumlet/php-image-resize.git",
|
||||
"reference": "39066a32de8476a32c9ac6322f9658021cee8638"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/gumlet/php-image-resize/zipball/39066a32de8476a32c9ac6322f9658021cee8638",
|
||||
"reference": "39066a32de8476a32c9ac6322f9658021cee8638",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"ext-fileinfo": "*",
|
||||
"ext-gd": "*",
|
||||
"php": ">=5.6.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"apigen/apigen": "^4.1",
|
||||
"ext-exif": "*",
|
||||
"ext-gd": "*",
|
||||
"php-coveralls/php-coveralls": "^2.1",
|
||||
"phpunit/phpunit": "^8.5"
|
||||
},
|
||||
"suggest": {
|
||||
"ext-exif": "Auto-rotate jpeg files"
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Gumlet\\": "lib/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Aditya Patadia",
|
||||
"homepage": "http://aditya.patadia.org/"
|
||||
}
|
||||
],
|
||||
"description": "PHP class to re-size and scale images",
|
||||
"homepage": "https://github.com/gumlet/php-image-resize",
|
||||
"keywords": [
|
||||
"image",
|
||||
"php",
|
||||
"resize",
|
||||
"scale"
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/gumlet/php-image-resize/issues",
|
||||
"source": "https://github.com/gumlet/php-image-resize/tree/2.0.2"
|
||||
},
|
||||
"time": "2022-05-12T11:03:20+00:00"
|
||||
},
|
||||
{
|
||||
"name": "kirbyzone/sitemapper",
|
||||
"version": "1.2.1",
|
||||
|
@ -569,6 +510,45 @@
|
|||
},
|
||||
"time": "2016-12-13T01:01:17+00:00"
|
||||
},
|
||||
{
|
||||
"name": "mullema/k3-image-clip",
|
||||
"version": "3.0.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/mullema/k3-image-clip.git",
|
||||
"reference": "ac6a4a461ae8972557da24755005a3937a275b0c"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/mullema/k3-image-clip/zipball/ac6a4a461ae8972557da24755005a3937a275b0c",
|
||||
"reference": "ac6a4a461ae8972557da24755005a3937a275b0c",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"getkirby/composer-installer": "^1.2"
|
||||
},
|
||||
"type": "kirby-plugin",
|
||||
"extra": {
|
||||
"installer-name": "k3-image-clip"
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Matthias Müller",
|
||||
"email": "moeli@moeli.com",
|
||||
"homepage": "https://getkirby.com/plugins/mullema"
|
||||
}
|
||||
],
|
||||
"description": "Visual image clip for Kirby 3",
|
||||
"support": {
|
||||
"issues": "https://github.com/mullema/k3-image-clip/issues",
|
||||
"source": "https://github.com/mullema/k3-image-clip/tree/3.0.0"
|
||||
},
|
||||
"time": "2021-12-05T21:47:42+00:00"
|
||||
},
|
||||
{
|
||||
"name": "phpmailer/phpmailer",
|
||||
"version": "v6.5.4",
|
||||
|
@ -697,58 +677,6 @@
|
|||
},
|
||||
"time": "2021-05-03T11:20:27+00:00"
|
||||
},
|
||||
{
|
||||
"name": "steirico/kirby-plugin-image-crop-field",
|
||||
"version": "2.0.5",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/steirico/kirby-plugin-image-crop-field.git",
|
||||
"reference": "f4f637112e28296070665885654415bb307e328a"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/steirico/kirby-plugin-image-crop-field/zipball/f4f637112e28296070665885654415bb307e328a",
|
||||
"reference": "f4f637112e28296070665885654415bb307e328a",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"getkirby/composer-installer": "^1.1",
|
||||
"gumlet/php-image-resize": "2.0.*"
|
||||
},
|
||||
"type": "kirby-plugin",
|
||||
"autoload": {
|
||||
"files": [
|
||||
"config.php"
|
||||
],
|
||||
"classmap": [
|
||||
"fields/",
|
||||
"lib/"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Rico Steiner",
|
||||
"email": "rico@vweb.ch"
|
||||
}
|
||||
],
|
||||
"description": "A image cropping field for kirby.",
|
||||
"keywords": [
|
||||
"crop",
|
||||
"field",
|
||||
"image",
|
||||
"kirby3",
|
||||
"plugin"
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/steirico/kirby-plugin-image-crop-field/issues",
|
||||
"source": "https://github.com/steirico/kirby-plugin-image-crop-field/tree/v2.0.5"
|
||||
},
|
||||
"time": "2021-11-01T15:57:43+00:00"
|
||||
},
|
||||
{
|
||||
"name": "sylvainjule/matomo",
|
||||
"version": "1.0.7",
|
||||
|
|
|
@ -1,19 +0,0 @@
|
|||
title: Meta image
|
||||
accept:
|
||||
mime: image/jpeg, image/png
|
||||
fields:
|
||||
alt_text:
|
||||
label:
|
||||
en: Alternative text
|
||||
fr: Texte alternatif
|
||||
type: text
|
||||
crop:
|
||||
label:
|
||||
en: Social networks image crop
|
||||
fr: Recadrage pour les réseaux sociaux
|
||||
type: imagecrop
|
||||
minSize:
|
||||
width: 1200
|
||||
height: 675
|
||||
preserveAspectRatio: true
|
||||
width: 1/2
|
|
@ -1,16 +0,0 @@
|
|||
headline:
|
||||
en: Meta image
|
||||
fr: Méta image
|
||||
type: files
|
||||
template: meta_image
|
||||
layout: cards
|
||||
size: small
|
||||
image:
|
||||
query: file.croppedImage
|
||||
ratio: 16/9
|
||||
cover: false
|
||||
back: white
|
||||
max: 1
|
||||
help:
|
||||
en: "Image displayed by social networks (format: JPEG or PNG)."
|
||||
fr: "Image affichée par les réseaux sociaux (format : JPEG ou PNG)."
|
|
@ -8,8 +8,32 @@ fields:
|
|||
size: small
|
||||
buttons: false
|
||||
help:
|
||||
en: "Short description of the page displayed by search engines and social networks (recommended maximum length: 160 characters)."
|
||||
fr: "Courte description de la page affichée par les moteurs de recherche et les réseaux sociaux (taille maximale conseillée : 160 caractères)."
|
||||
en: "Short description of the page displayed by search engines and social networks (recommended maximum length: 160 characters). Home page meta description is used if this field is empty."
|
||||
fr: "Courte description de la page affichée par les moteurs de recherche et les réseaux sociaux (taille maximale conseillée : 160 caractères). La méta description de la page d'accueil est utilisée si ce champ est vide."
|
||||
width: 3/4
|
||||
gap:
|
||||
type: gap
|
||||
width: 1/4
|
||||
meta_image:
|
||||
label:
|
||||
en: Meta image
|
||||
fr: Méta image
|
||||
type: image-clip
|
||||
query: page.images
|
||||
uploads: image
|
||||
layout: cards
|
||||
image:
|
||||
cover: true
|
||||
back: white
|
||||
multiple: false
|
||||
clip:
|
||||
minwidth: 1200
|
||||
minheight: 675
|
||||
ratio: fixed
|
||||
help:
|
||||
en: "Image displayed by social networks (format: JPEG or PNG). Home page meta image is used if this field is empty."
|
||||
fr: "Image affichée par les réseaux sociaux (format : JPEG ou PNG). La méta image de la page d'accueil est utilisée si ce champ est vide."
|
||||
width: 1/4
|
||||
# Hidden fields
|
||||
og_type:
|
||||
type: hidden
|
||||
|
|
44
site/blueprints/sections/home_seo_metadata.yml
Normal file
44
site/blueprints/sections/home_seo_metadata.yml
Normal file
|
@ -0,0 +1,44 @@
|
|||
type: fields
|
||||
fields:
|
||||
meta_description:
|
||||
label:
|
||||
en: Meta description
|
||||
fr: Méta description
|
||||
type: textarea
|
||||
size: small
|
||||
buttons: false
|
||||
required: true
|
||||
help:
|
||||
en: "Short description of the page displayed by search engines and social networks (recommended maximum length: 160 characters)."
|
||||
fr: "Courte description de la page affichée par les moteurs de recherche et les réseaux sociaux (taille maximale conseillée : 160 caractères)."
|
||||
width: 3/4
|
||||
gap:
|
||||
type: gap
|
||||
width: 1/4
|
||||
meta_image:
|
||||
label:
|
||||
en: Meta image
|
||||
fr: Méta image
|
||||
type: image-clip
|
||||
query: page.images
|
||||
layout: cards
|
||||
image:
|
||||
cover: true
|
||||
back: white
|
||||
multiple: false
|
||||
required: true
|
||||
clip:
|
||||
minwidth: 1200
|
||||
minheight: 675
|
||||
ratio: fixed
|
||||
help:
|
||||
en: "Image displayed by social networks (format: JPEG or PNG)."
|
||||
fr: "Image affichée par les réseaux sociaux (format : JPEG ou PNG)."
|
||||
width: 1/4
|
||||
# Hidden fields
|
||||
og_type:
|
||||
type: hidden
|
||||
default: article
|
||||
twitter_card_type:
|
||||
type: hidden
|
||||
default: summary_large_image
|
|
@ -2,10 +2,5 @@ label:
|
|||
en: SEO
|
||||
fr: Référencement
|
||||
icon: search
|
||||
columns:
|
||||
- width: 3/4
|
||||
sections:
|
||||
seo_basic_meta: sections/generic_seo_metadata
|
||||
- width: 1/3
|
||||
sections:
|
||||
seo_meta_image: sections/generic_seo_meta_image
|
||||
|
|
|
@ -2,10 +2,5 @@ label:
|
|||
en: SEO
|
||||
fr: Référencement
|
||||
icon: search
|
||||
columns:
|
||||
- width: 3/4
|
||||
sections:
|
||||
seo_basic_meta: sections/generic_seo_metadata
|
||||
- width: 1/3
|
||||
sections:
|
||||
seo_meta_image: sections/generic_seo_meta_image
|
||||
|
|
|
@ -2,10 +2,5 @@ label:
|
|||
en: SEO
|
||||
fr: Référencement
|
||||
icon: search
|
||||
columns:
|
||||
- width: 3/4
|
||||
sections:
|
||||
seo_basic_meta: sections/generic_seo_metadata
|
||||
- width: 1/3
|
||||
sections:
|
||||
seo_meta_image: sections/generic_seo_meta_image
|
||||
seo_basic_meta: sections/home_seo_metadata
|
||||
|
|
|
@ -29,10 +29,10 @@
|
|||
<meta name="date" content="{{ page.modified('Y-m-d') }}">
|
||||
|
||||
<!-- Image -->
|
||||
{% if page.images.template('meta_image') is not empty %}
|
||||
<meta id="schema_image" itemprop="image" content="{{ page.images.template('meta_image').first.url }}">
|
||||
{% elseif site.homePage.images.template('meta_image') is not empty %}
|
||||
<meta id="schema_image" itemprop="image" content="{{ site.homePage.images.template('meta_image').first.url }}">
|
||||
{% if page.meta_image is not empty %}
|
||||
<meta id="schema_image" itemprop="image" content="{{ page.meta_image.toImage.url }}">
|
||||
{% elseif site.homePage.meta_image is not empty %}
|
||||
<meta id="schema_image" itemprop="image" content="{{ site.homePage.meta_image.toImage.url }}">
|
||||
{% endif %}
|
||||
|
||||
{% if page.template != 'error' %}
|
||||
|
@ -44,12 +44,12 @@
|
|||
{% elseif site.homePage.meta_description is not empty %}
|
||||
<meta property="og:description" content="{{ site.homePage.meta_description }}">
|
||||
{% endif %}
|
||||
{% if page.images.template('meta_image') is not empty %}
|
||||
<meta property="og:image" content="{{ page.images.template('meta_image').first.croppedImage.resize(1200, 675).url }}">
|
||||
{% if page.meta_image is not empty %}
|
||||
<meta property="og:image" content="{{ page.meta_image.toImage.clip(1200, 675).url }}">
|
||||
<meta property="og:image:width" content="1200">
|
||||
<meta property="og:image:height" content="675">
|
||||
{% elseif site.homePage.images.template('meta_image') is not empty %}
|
||||
<meta property="og:image" content="{{ site.homePage.images.template("meta_image").first.croppedImage.resize(1200, 675).url }}">
|
||||
{% elseif site.homePage.meta_image is not empty %}
|
||||
<meta property="og:image" content="{{ site.homePage.meta_image.toImage.clip(1200, 675).url }}">
|
||||
<meta property="og:image:width" content="1200">
|
||||
<meta property="og:image:height" content="675">
|
||||
{% endif %}
|
||||
|
@ -64,10 +64,10 @@
|
|||
{% elseif site.homePage.meta_description is not empty %}
|
||||
<meta name="twitter:description" content="{{ site.homePage.meta_description }}">
|
||||
{% endif %}
|
||||
{% if page.images.template('meta_image') is not empty %}
|
||||
<meta name="twitter:image" content="{{ page.images.template('meta_image').first.croppedImage.resize(1200, 675).url }}">
|
||||
{% elseif site.homePage.images.template('meta_image') is not empty %}
|
||||
<meta name="twitter:image" content="{{ site.homePage.images.template("meta_image").first.croppedImage.resize(1200, 675).url }}">
|
||||
{% if page.meta_image is not empty %}
|
||||
<meta name="twitter:image" content="{{ page.meta_image.toImage.clip(1200, 675).url }}">
|
||||
{% elseif site.homePage.meta_image is not empty %}
|
||||
<meta name="twitter:image" content="{{ site.homePage.meta_image.toImage.clip(1200, 675).url }}">
|
||||
{% endif %}
|
||||
|
||||
{% endif %}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue