diff options
author | 2018-03-14 10:19:56 +0000 | |
---|---|---|
committer | 2018-03-14 10:19:56 +0000 | |
commit | 1cb18be258bb744415f48a3e319e1cf35c570e98 (patch) | |
tree | 05cbd2cda70731f27a310822eefb84fb7b102e04 /templates | |
parent | Add payment info for resources, and two more resources (diff) |
Dynamic OpenGraph metadata in page templates
Diffstat (limited to 'templates')
-rw-r--r-- | templates/errors/error.html | 4 | ||||
-rw-r--r-- | templates/main/base.html | 6 | ||||
-rw-r--r-- | templates/main/index.html | 1 | ||||
-rw-r--r-- | templates/main/info/help.html | 2 | ||||
-rw-r--r-- | templates/main/info/index.html | 2 | ||||
-rw-r--r-- | templates/main/info/resources.html | 2 | ||||
-rw-r--r-- | templates/main/info/rules.html | 2 | ||||
-rw-r--r-- | templates/main/ws_test.html | 2 | ||||
-rw-r--r-- | templates/staff/staff.html | 4 |
9 files changed, 20 insertions, 5 deletions
diff --git a/templates/errors/error.html b/templates/errors/error.html index 1d1fef03..13ff98db 100644 --- a/templates/errors/error.html +++ b/templates/errors/error.html @@ -1,5 +1,7 @@ {% extends 'main/base.html' %} -{% block title %} Error {{ code }} {% endblock %} +{% block title %}Error {{ code }}{% endblock %} +{% block og_title %}Error {{ code }}{% endblock %} +{% block og_description %}{{ error_message | safe }}{% endblock %} {% block beta_error %}{% endblock %} {% block extra_head %} diff --git a/templates/main/base.html b/templates/main/base.html index 7e58fa97..43a06bfb 100644 --- a/templates/main/base.html +++ b/templates/main/base.html @@ -2,7 +2,7 @@ <html lang="en"> <head> {% block head %} - <title>Python | {% block title %}{% endblock %}</title> + <title>Python Discord | {% block title %}{% endblock %}</title> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <script defer src="https://use.fontawesome.com/releases/v5.0.6/js/all.js"></script> @@ -12,8 +12,8 @@ <link rel="stylesheet" href="/static/style.css"/> <!-- OpenGraph metadata --> - <meta property="og:title" content="Python Discord"> - <meta property="og:description" content="We're a large, friendly community focused around the Python programming language. Our community is open to those who wish to learn the language, as well as those looking to help others."> + <meta property="og:title" content="Python Discord | {% block og_title %}{% endblock %}"> + <meta property="og:description" content="{% block og_description %}We're a large, friendly community focused around the Python programming language. Our community is open to those who wish to learn the language, as well as those looking to help others.{% endblock %}"> <meta content="/static/logos/logo_discord.png" property="og:image"> {% endblock %} {% block extra_head %} diff --git a/templates/main/index.html b/templates/main/index.html index 1f39e7ad..9084f305 100644 --- a/templates/main/index.html +++ b/templates/main/index.html @@ -1,5 +1,6 @@ {% extends "main/base.html" %} {% block title %}Home{% endblock %} +{% block og_title %}Home{% endblock %} {% block content %} <div class="uk-section uk-section-primary"> <div class="uk-container uk-text-center"> diff --git a/templates/main/info/help.html b/templates/main/info/help.html index de041f66..79efcfc3 100644 --- a/templates/main/info/help.html +++ b/templates/main/info/help.html @@ -1,5 +1,7 @@ {% extends "main/base.html" %} {% block title %}Getting Help{% endblock %} +{% block og_title %}Getting Help{% endblock %} +{% block og_description %}A guide on how to ask good questions, how to avoid annoying those helping out, and how to interpret answers{% endblock %} {% block content %} <div class="uk-section"> <div class="uk-container uk-container-small"> diff --git a/templates/main/info/index.html b/templates/main/info/index.html index fe779a3b..89e87eb9 100644 --- a/templates/main/info/index.html +++ b/templates/main/info/index.html @@ -1,5 +1,7 @@ {% extends "main/base.html" %} {% block title %}Information{% endblock %} +{% block og_title %}Information{% endblock %} +{% block og_description %}Informational pages, listings and guides{% endblock %} {% block content %} <div class="uk-section"> <div class="uk-container uk-container-small"> diff --git a/templates/main/info/resources.html b/templates/main/info/resources.html index 6e8a616d..f74b7adb 100644 --- a/templates/main/info/resources.html +++ b/templates/main/info/resources.html @@ -1,5 +1,7 @@ {% extends "main/base.html" %} {% block title %}Resources{% endblock %} +{% block og_title %}Resources{% endblock %} +{% block og_description %}A list of helpful resources for beginner and experienced Python programmers alike{% endblock %} {% block content %} <div class="uk-section"> <div class="uk-container uk-container-small"> diff --git a/templates/main/info/rules.html b/templates/main/info/rules.html index 1853f090..dd7e14d4 100644 --- a/templates/main/info/rules.html +++ b/templates/main/info/rules.html @@ -1,5 +1,7 @@ {% extends "main/base.html" %} {% block title %}Rules{% endblock %} +{% block og_title %}Rules{% endblock %} +{% block og_description %}The server rules, along with an explanation of what happens when they're broken{% endblock %} {% block content %} <div class="uk-section"> <div class="uk-container uk-container-small"> diff --git a/templates/main/ws_test.html b/templates/main/ws_test.html index a492fb89..64a7dfc4 100644 --- a/templates/main/ws_test.html +++ b/templates/main/ws_test.html @@ -1,5 +1,7 @@ {% extends "main/base.html" %} {% block title %}WS Test{% endblock %} +{% block og_title %}WS Test{% endblock %} +{% block og_description %}A test page for our Websockets implementation{% endblock %} {% block content %} <div class="uk-container uk-section"> <h1>Open your JS console to test</h1> diff --git a/templates/staff/staff.html b/templates/staff/staff.html index 39f75f81..5551ed87 100644 --- a/templates/staff/staff.html +++ b/templates/staff/staff.html @@ -1,5 +1,7 @@ {% extends "main/base.html" %} -{% block title %}Home{% endblock %} +{% block title %}Staff |Home{% endblock %} +{% block og_title %}Staff | Home{% endblock %} +{% block og_description %}Landing page for the staff management area{% endblock %} {% block content %} <div class="uk-container uk-section"> <h1 class="uk-title uk-text-center"> |