Add opengraph metadata

Signed-off-by: Fey Naomi Schrewe <fey@posteo.eu>
This commit is contained in:
Fey Naomi Schrewe 2023-09-04 17:46:43 +02:00
parent 19d17598c7
commit f73377396d
Signed by: fey.naomi
GPG Key ID: 3A5FCB79D85C91C3
4 changed files with 24 additions and 1 deletions

View File

@ -1,5 +1,6 @@
# The URL the site will be built for
base_url = "https://nom.fey.ink"
title = "nom"
# Whether to automatically compile all Sass files in the sass directory
compile_sass = true
@ -17,4 +18,4 @@ taxonimies = [
highlight_code = false
[extra]
# Put all your custom variables here
# Put all your custom variables here

3
content/_index.md Normal file
View File

@ -0,0 +1,3 @@
+++
title = "fey's cookbook"
+++

View File

@ -1,3 +1,4 @@
+++
title = "recipes"
description = "everything I cook"
+++

View File

@ -1,6 +1,24 @@
{% if section %}
{% set meta = section %}
{% else %}
{% if page %}
{% set meta = page %}
{% endif %}
{% endif %}
<!DOCTYPE html>
<html>
<head>
<title>{{ meta.title }}</title>
<meta property="og:type" content="website">
<meta property="og:site" content="{%if config.title %}{{ config.title }}{% else %}{{ config.base_url }}{% endif %}">
<meta property="og:url" content="{{ get_url(path=meta.path) }}">
<meta property="og:title" content="{{ meta.title }}">
{% if meta.description -%}
<meta property="og:description" content="{{ meta.description }}">
{%- endif %}
{% if meta.extra.thumbnail -%}#
<meta property="og:image" content="{{ get_url(path=meta.extra.thumbnail) }}">
{%- endif %}
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>