Use block for page and meta title

This commit is contained in:
Helen Chong 2024-04-19 07:13:50 +08:00
parent 4333a82e15
commit 6b465c3587
1 changed files with 6 additions and 3 deletions

View File

@ -1,4 +1,3 @@
{%- set pageTitle %}{{ title + " | " if title }}{{ sitemeta.siteName | safe }}{% endset -%}
<!DOCTYPE html>
<html lang="en" dir="ltr" id="page-top">
<head>
@ -7,7 +6,9 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
{# Meta data #}
<meta property="og:title" content="{{ title if title else sitemeta.siteName }}">
{% block metaTitle %}
<meta property="og:title" content="{{ title if title else sitemeta.siteName }}">
{% endblock %}
{% include "global/metagen.njk" %}
{# CSS #}
@ -25,7 +26,9 @@
<link rel="manifest" href="/assets/favicon/site.webmanifest">
{% endblock %}
<title>{{ pageTitle }}</title>
<title>
{% block pageTitle %}{{ title + " | " if title }}{{ sitemeta.siteName | safe }}{% endblock %}
</title>
</head>
<body>
{% block name %}{% include "global/hero.njk" %}{% endblock %}