From 528ef17e6d655ca1748f8c84944b5bf1e857feac Mon Sep 17 00:00:00 2001 From: Wesley Moore Date: Sun, 10 Mar 2024 15:30:18 +1000 Subject: [PATCH] Add OpenGraph metadata --- config.toml | 1 + templates/index.html | 13 ++++++++++++- templates/page.html | 10 ++++++++++ templates/section.html | 10 ++++++++++ themes/juice/templates/index.html | 4 +++- 5 files changed, 36 insertions(+), 2 deletions(-) diff --git a/config.toml b/config.toml index ee22be8..9e83064 100644 --- a/config.toml +++ b/config.toml @@ -24,6 +24,7 @@ smart_punctuation = true [extra] email = "wes@wezm.net" author = "Wesley Moore" +twitter_name = "@wezm" homepage = "https://www.wezm.net/" juice_logo_name = "RSS Please" juice_logo_path = "feed-icon.svg" diff --git a/templates/index.html b/templates/index.html index 0d2167c..1b5fefe 100644 --- a/templates/index.html +++ b/templates/index.html @@ -1,5 +1,5 @@ {% extends "juice/templates/index.html" %} -{% block title %}{{ section.title }} - {{ section.description }} {% endblock title %} +{% block title %}{{ section.title }} - {{ section.description }}{% endblock title %} {% block hero %}
@@ -31,6 +31,17 @@ {% endblock %} +{% block metadata %} + + + + + + + + +{% endblock %} + {% block fonts %} {% endblock %} diff --git a/templates/page.html b/templates/page.html index bd53111..6dfb912 100644 --- a/templates/page.html +++ b/templates/page.html @@ -1,6 +1,16 @@ {% extends "juice/templates/page.html" %} {% block title %}{{ page.title }} - {{ config.title }} {% endblock title %} +{% block metadata %} + + + + + + + +{% endblock %} + {% block content %} {% if page.description %}

{{ page.description }}

diff --git a/templates/section.html b/templates/section.html index f65bf0e..7c6cf6b 100644 --- a/templates/section.html +++ b/templates/section.html @@ -9,6 +9,16 @@ {% endblock header %} +{% block metadata %} + + + + + + + +{% endblock %} + {% block content %}

{{ section.description }}

{{ section.content | safe }} diff --git a/themes/juice/templates/index.html b/themes/juice/templates/index.html index c10a647..85ba6b8 100644 --- a/themes/juice/templates/index.html +++ b/themes/juice/templates/index.html @@ -18,6 +18,8 @@ {% block head %} {% endblock head %} + {% block metadata %} + {% endblock metadata %} @@ -141,4 +143,4 @@ items.forEach(item => observer.observe(item)); - \ No newline at end of file +