From 33ae2bef3479137c7adae82c6e63b36b7661666f Mon Sep 17 00:00:00 2001 From: Evan Pratten Date: Wed, 14 Dec 2022 11:27:08 -0500 Subject: [PATCH] some in-progress opengraph support --- content/music/evan-pratten/channels.md | 6 ++++++ templates/components/metadata/opengraph.html | 13 +++++++++++++ templates/page.html | 3 +++ 3 files changed, 22 insertions(+) diff --git a/content/music/evan-pratten/channels.md b/content/music/evan-pratten/channels.md index 40aeef3..c9c3b6f 100644 --- a/content/music/evan-pratten/channels.md +++ b/content/music/evan-pratten/channels.md @@ -8,6 +8,12 @@ draft: false extra: icon: las la-music excerpt: '"Channels" is a single by Evan Pratten, released on November 25, 2022.' + opengraph: + song: + duration: 3:24 + artists: + - first_name: Evan + last_name: Pratten --- I just published a new song! diff --git a/templates/components/metadata/opengraph.html b/templates/components/metadata/opengraph.html index 50302f0..1245e06 100644 --- a/templates/components/metadata/opengraph.html +++ b/templates/components/metadata/opengraph.html @@ -18,4 +18,17 @@ {# Article-specifics #} {% if is_article %} +{% endif %} + +{# music specifics #} +{% if opengraph %} +{% if opengraph.song %} + + +{% endif %} + +{% if opengraph.album %} + + +{% endif %} {% endif %} \ No newline at end of file diff --git a/templates/page.html b/templates/page.html index 9ca2c9d..9a6fc27 100644 --- a/templates/page.html +++ b/templates/page.html @@ -32,6 +32,9 @@ {% if page.extra.redir_to %} {% set redirect_target = page.extra.redir_to %} {% endif %} +{% if page.extra.opengraph %} +{% set opengraph = page.extra.opengraph %} +{% endif %} {% endblock variable_wormhole %} {# Page content #}