From 3f49f17baa59542598cdd77cb163a438bda48ea9 Mon Sep 17 00:00:00 2001 From: TheAMM Date: Fri, 26 May 2017 01:03:59 +0300 Subject: [PATCH] Add simple OG metadata tags to templates Hello, #185 --- nyaa/templates/404.html | 3 +++ nyaa/templates/home.html | 7 +++++++ nyaa/templates/layout.html | 7 +++++++ nyaa/templates/login.html | 3 +++ nyaa/templates/register.html | 3 +++ nyaa/templates/upload.html | 3 +++ nyaa/templates/user.html | 9 +++++++++ nyaa/templates/view.html | 4 ++++ 8 files changed, 39 insertions(+) diff --git a/nyaa/templates/404.html b/nyaa/templates/404.html index f964daf..d3fe555 100644 --- a/nyaa/templates/404.html +++ b/nyaa/templates/404.html @@ -1,5 +1,8 @@ {% extends "layout.html" %} {% block title %}404 Not Found :: {{ config.SITE_NAME }}{% endblock %} +{% block metatags %} + +{% endblock %} {% block body %}

404 Not Found

The path you requested does not exist on this server.

diff --git a/nyaa/templates/home.html b/nyaa/templates/home.html index 3b46d2b..289716b 100644 --- a/nyaa/templates/home.html +++ b/nyaa/templates/home.html @@ -1,5 +1,12 @@ {% extends "layout.html" %} {% block title %}{% if search.term %}{{ search.term | e}}{% else %}Browse{% endif %} :: {{ config.SITE_NAME }}{% endblock %} +{% block metatags %} +{% if search.term %} + +{% else %} + +{% endif %} +{% endblock %} {% block body %} {% if search["term"] == '' %} diff --git a/nyaa/templates/layout.html b/nyaa/templates/layout.html index a81975a..e0184be 100755 --- a/nyaa/templates/layout.html +++ b/nyaa/templates/layout.html @@ -11,6 +11,13 @@ + + + + {% block metatags %} + {# Filled by children #} + {% endblock %} +