Set common meta tags on all pages for better SSO

This commit is contained in:
timvisee 2019-10-30 17:24:58 +01:00
parent 7ec6eec7b6
commit 8506c9fb07
No known key found for this signature in database
GPG Key ID: B8DB720BC383E172
2 changed files with 31 additions and 1 deletions

View File

@ -1,7 +1,7 @@
base_url = "https://timvisee.com"
title = "Tim Visée"
description = "My personal blog"
description = "Personal portfolio and blog of Tim Visée"
theme = "zenn"
default_language = "en"

View File

@ -11,6 +11,36 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" type="image/png" href="/favicon.png" />
<meta name="application-name" content="{{ config.title }}" />
<meta name="author" content="{{ config.extra.author }}" />
{% if page.title %}
<meta name="title" content="{{ page.title }}" />
{% elif section.title %}
<meta name="title" content="{{ section.title }}" />
{% else %}
<meta name="title" content="{{ config.title }}" />
{% endif %}
{% if page.description %}
<meta name="description" content="{{ page.description }}" />
{% elif section.description %}
<meta name="description" content="{{ section.description }}" />
{% else %}
<meta name="description" content="{{ config.description }}" />
{% endif %}
{% set tags = get_taxonomy(kind="tags") %}
{% set keywords = [] %}
{% if tags.items | length > 0 %}
{%- for tag in tags.items -%}
{% set_global keywords = keywords | concat(with=tag.name) %}
{%- endfor -%}
{% endif %}
{% if keywords | length > 0 %}
<meta name="keywords" content="{{ keywords | join(sep=",") }}"/>
{% endif %}
<title>
{%- block title -%}
{%- if page.title -%}