From 77c40e648f4be46a31ff69e0e3588f1c31d113c5 Mon Sep 17 00:00:00 2001 From: eater <=@eater.me> Date: Wed, 20 May 2020 02:43:33 +0200 Subject: [PATCH] add meta and link elements --- composer.lock | 6 ++++-- views/base.html.twig | 2 ++ views/page.html.twig | 6 ++++++ views/post.html.twig | 6 ++++++ views/rss.xml.twig | 2 +- 5 files changed, 19 insertions(+), 3 deletions(-) diff --git a/composer.lock b/composer.lock index a46486d..89d7405 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "cb1bcd865d190652150546ba6be7fcf6", + "content-hash": "25e0e0bcf7d89336126bb3980d1c5326", "packages": [ { "name": "fig/http-message-util", @@ -977,6 +977,8 @@ "stability-flags": [], "prefer-stable": false, "prefer-lowest": false, - "platform": [], + "platform": { + "ext-json": "*" + }, "platform-dev": [] } diff --git a/views/base.html.twig b/views/base.html.twig index c1b4856..573f646 100644 --- a/views/base.html.twig +++ b/views/base.html.twig @@ -6,7 +6,9 @@ content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"> + {% block title %}{{ config.blog.title }}{% endblock %} + {% block head %}{% endblock %}
diff --git a/views/page.html.twig b/views/page.html.twig index a9c6463..ca0c3ca 100644 --- a/views/page.html.twig +++ b/views/page.html.twig @@ -1,5 +1,11 @@ {% extends "base.html.twig" %} +{% block head %} + + + +{% endblock %} + {% block title %}{{ parent() }} — {{ page.meta.title }}{% endblock %} {% block body %} diff --git a/views/post.html.twig b/views/post.html.twig index f5c7fb3..6a97fe7 100644 --- a/views/post.html.twig +++ b/views/post.html.twig @@ -1,6 +1,12 @@ {% extends "base.html.twig" %} {% import "macros.html.twig" as macros %} +{% block head %} + + + +{% endblock %} + {% block title %}{{ parent() }} — {{ post.meta.title }}{% endblock %} {% block body %} diff --git a/views/rss.xml.twig b/views/rss.xml.twig index 0e3f9a7..6b9b104 100644 --- a/views/rss.xml.twig +++ b/views/rss.xml.twig @@ -9,7 +9,7 @@ {{ post.meta.title }} {{ post.meta.description }} - {{ config.blog.link }}/post/{{ post.slug }} + {{ config.blog.link }}post/{{ post.slug }} {{ post.slug }} {{ post.meta.date.format('r') }}