From a5a2e0ae482a5168781b4abf952885531bdc93cc Mon Sep 17 00:00:00 2001
From: Clayton Craft
Date: Sun, 17 Apr 2022 15:34:03 -0700
Subject: make generating seo-related tags optional
---
templates/404.html | 11 ++++---
templates/base.html | 87 +++++++++++++++++++++++++++++------------------------
2 files changed, 55 insertions(+), 43 deletions(-)
(limited to 'templates')
diff --git a/templates/404.html b/templates/404.html
index 22e8791..23c7168 100644
--- a/templates/404.html
+++ b/templates/404.html
@@ -2,10 +2,13 @@
{# Title #}
{% block title %}
Sorry! Page not found.{% endblock title %}
-{% block current_url %}
-
-
-{% endblock current_url %}
+
+{% if config.extra.seo | default(value=true) %}
+ {% block current_url %}
+
+
+ {% endblock current_url %}
+{% endif %}
{# Page heading #}
{% block content %}
diff --git a/templates/base.html b/templates/base.html
index 0e826da..77c4742 100644
--- a/templates/base.html
+++ b/templates/base.html
@@ -11,12 +11,16 @@
{% block description %}
{% if page.description %}
+ {% if config.extra.seo | default(value=true) %}
+ {% endif %}
{% else %}
+ {% if config.extra.seo | default(value=true) %}
+ {% endif %}
{% endif %}
{% endblock description %}
@@ -47,53 +51,58 @@
{% endif %}
{% if config.generate_feed %}{% endif %}
- {% block ogp_head %}
- {% if page.title %}
-
-
- {% else %}
-
-
- {% endif %}
+ {% if config.extra.seo | default(value=true) %}
+ {% block ogp_head %}
+ {% if page.title %}
+
+
+ {% else %}
+
+
+ {% endif %}
-
-
-
- {% endblock ogp_head %}
+
+
+
+
+ {% endblock ogp_head %}
- {% block current_url %}
- {% endblock current_url %}
+ {% block current_url %}
+
+
+ {% endblock current_url %}
- {% if config.extra.social.twitter %}
-
-
- {% endif %}
+ {% if config.extra.social.twitter %}
+
+
+ {% endif %}
- {% if page.extra.thumbnail %}
-
-
-
- {% elif page.extra.static_thumbnail %}
- {%if page.extra.static_thumbnail is matching("^http[s]?://") %}
+ {% if page.extra.thumbnail %}
-
-
+
+
+ {% elif page.extra.static_thumbnail %}
+ {%if page.extra.static_thumbnail is matching("^http[s]?://") %}
+
+
+
+ {% else %}
+
+
+
+ {% endif %}
+ {% elif config.extra.default_og_image %}
+
+
+
+ {% elif config.extra.banner %}
+
+
+
{% else %}
-
-
-
+
{% endif %}
- {% elif config.extra.default_og_image %}
-
-
-
- {% elif config.extra.banner %}
-
-
-
- {% else %}
-
{% endif %}
{% block extra_head %}{% endblock extra_head %}
--
cgit v1.3.1