Skip to content

Commit

Permalink
Merge branch 'release/3.3.7'
Browse files Browse the repository at this point in the history
  • Loading branch information
janhenckens committed Nov 19, 2023
2 parents 80c7b9b + c27654a commit ad731ed
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/).

## 3.3.7 - 2023-11-19
### Fixed
- Fixed an issue where page title wouldn't be used as fallback meta title ([#86](https://github.com/studioespresso/craft-seo-fields/issues/86))


## 3.3.6 - 2023-11-15
### Fixed
- Final fix for pagination on redirects & 404's ([#85](https://github.com/studioespresso/craft-seo-fields/pull/85))
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "studioespresso/craft-seo-fields",
"description": "Fields for your SEO & OG meta data",
"type": "craft-plugin",
"version": "3.3.6",
"version": "3.3.7",
"keywords": [
"craft",
"cms",
Expand Down
9 changes: 4 additions & 5 deletions src/templates/_meta.twig
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,13 @@
{#{% set element = seoFields.element %}#}
{#{% set meta = seoFields.meta %}#}

{% if meta %}

{% if meta and element %}
<title>{{ meta.getPageTitle(element) }}</title>
<meta name="description" content="{{ meta.getMetaDescription() }}">
{# Facebook #}
<meta property="og:url" content="{{ craft.app.request.absoluteUrl }}"/>
<meta property="og:type" content="website"/>
<meta property="og:title" content="{{ meta.getOgTitle() }}"/>
<meta property="og:title" content="{{ meta.getOgTitle(element ?? '') }}"/>
{% set ogImage = meta.getOgImage() %}
{% if ogImage %}
<meta property="og:image" content="{{ ogImage.url }}"/>
Expand All @@ -26,9 +25,9 @@
{# Twitter #}
<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:site" content="" />
<meta name="twitter:url" content="{{ craft.app.request.absoluteUrl }}" />
<meta name="twitter:title" content="{{ meta.getTwitterTitle() }}" />
<meta name="twitter:title" content="{{ meta.getTwitterTitle(element ?? '') }}" />
<meta name="twitter:description" content="{{ meta.getTwitterDescription() }}" />
<meta name="twitter:url" content="{{ craft.app.request.absoluteUrl }}" />
{% if ogImage %}
<meta name="twitter:image" content="{{ meta.getTwitterImage().url ?? ogImage.url }}" />
{% endif %}
Expand Down

0 comments on commit ad731ed

Please sign in to comment.