From 793d8bab1c9ffc2b0caaf67e47b7e9672e99eb58 Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Mon, 20 Sep 2021 08:24:34 +0100 Subject: [PATCH] fix: override front page meta title --- source/_pages/index.md | 2 ++ source/_partials/meta.html.twig | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/source/_pages/index.md b/source/_pages/index.md index e6e343cb..1eb0e084 100644 --- a/source/_pages/index.md +++ b/source/_pages/index.md @@ -3,6 +3,8 @@ title: Oliver Davies - UK-based Lead Software Developer, PHP and Drupal speciali permalink: / is_front: true exclude_from_sitemap: true +meta: + title: Lead Drupal and PHP Software Developer | Oliver Davies ---
diff --git a/source/_partials/meta.html.twig b/source/_partials/meta.html.twig index 9a8e125a..8e7c0048 100644 --- a/source/_partials/meta.html.twig +++ b/source/_partials/meta.html.twig @@ -6,6 +6,10 @@ {% set pageTitle = [page.title, '-', site.name]|join(' ') %} {% endif %} +{% if page.meta.title %} + {% set pageTitle = page.meta.title %} +{% endif %} + {% set metaDescription = site.description %} {% if page.meta.description %} {% set metaDescription = page.meta.description|e('html') %}