aboutsummaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorYaroslav de la Peña Smirnov <yps@yaroslavps.com>2022-03-30 01:00:57 +0300
committerYaroslav de la Peña Smirnov <yps@yaroslavps.com>2022-03-30 01:00:57 +0300
commit021dfd45a1f666100995a836d23002960ac13e9a (patch)
treeae0f03619ca2ff81c01dcf99c114f04d9c98a128 /templates
parent68c6c7ef2ad6eb54a242846d6f0cc59b09db25d6 (diff)
downloadyaroslavps.com-021dfd45a1f666100995a836d23002960ac13e9a.tar.gz
yaroslavps.com-021dfd45a1f666100995a836d23002960ac13e9a.zip
Spaghetti Bolognese and other changes.
Now the main photo of each recipe is just `recipe.jpg` so that it easier to access it programatically. Also added OGP meta tags for pretty previews in Telegram and other apps.
Diffstat (limited to 'templates')
-rw-r--r--templates/page.html11
1 files changed, 11 insertions, 0 deletions
diff --git a/templates/page.html b/templates/page.html
index 9fa9c35..12240b7 100644
--- a/templates/page.html
+++ b/templates/page.html
@@ -1,4 +1,15 @@
{% extends "base.html" %}
+{% block extrahead %}
+<meta property="og:title" content="{{ page.title }}" />
+<meta property="og:url" content="{{ page.permalink }}" />
+<meta property="og:type" content="article" />
+{% if page.summary %}
+<meta property="og:description" content="{{ page.summary }}" />
+{% endif %}
+{% if page.permalink is containing("food") %}
+<meta property="og:image" content="recipe.jpg" />
+{% endif %}
+{% endblock %}
{% block title %}
{% if page.permalink is containing("weblog") %}
{{ page.title }} - Yaroslav's weblog