From d1deb8486f1f70e5ad44cb65279e52e1ed64ba89 Mon Sep 17 00:00:00 2001 From: Jieiku Date: Tue, 31 May 2022 01:24:13 -0700 Subject: Seo Per Page --- templates/categories/list.html | 15 +++++++++++++++ templates/categories/single.html | 15 +++++++++++++++ templates/contact.html | 24 ++++++++++++++++++++++++ templates/page.html | 32 +++++++++++++++++++++++++++++++- templates/pages.html | 25 +++++++++++++++++++++++++ templates/posts.html | 18 ++++++++++++++++++ templates/tags/list.html | 15 +++++++++++++++ templates/tags/single.html | 15 +++++++++++++++ 8 files changed, 158 insertions(+), 1 deletion(-) (limited to 'templates') diff --git a/templates/categories/list.html b/templates/categories/list.html index 485d54d..f85f732 100644 --- a/templates/categories/list.html +++ b/templates/categories/list.html @@ -1,5 +1,20 @@ {% extends "base.html" %} +{%- block seo %} + {{- super() }} + {%- set title = "Categories" %} + + {%- if config.title %} + {%- set title_addition = title_separator ~ config.title %} + {%- else %} + {%- set title_addition = "" %} + {%- endif %} + + {%- set description = config.description %} + + {{- macros_head::seo(title=title, title_addition=title_addition, description=description, is_home=true) }} +{%- endblock seo %} + {%- block content %}
Want to get in touch? Fill out the form below to send me a message and I will get back to you as soon as possible!
diff --git a/templates/page.html b/templates/page.html index 6ea50d6..8482633 100644 --- a/templates/page.html +++ b/templates/page.html @@ -1,5 +1,35 @@ +{# This Page Shows the Individual Blog Posts#} + {% extends "base.html" %} -{% import "macros/macros.html" as macros %} + +{%- block seo %} + {{- super() }} + {%- set title_addition = "" %} + {%- if page.title and config.title %} + {%- set title = page.title %} + {%- set title_addition = title_separator ~ config.title %} + {%- elif page.title %} + {%- set title = page.title %} + {%- else %} + {%- set title = config.title %} + {%- endif %} + + {%- if page.description %} + {%- set description = page.description %} + {%- else %} + {%- set description = config.description %} + {%- endif %} + {%- set created_time = page.date %} + {%- set updated_time = page.updated %} + {%- if current_section %} + {%- set page_section = current_section %} + {%- else %} + {%- set page_section = "" %} + {%- endif %} + + {{- macros_head::seo(title=title, title_addition=title_addition, description=description, type="article", is_page=true, created_time=created_time, updated_time=updated_time, page_section=page_section) }} +{%- endblock seo %} + {%- block content %}