From d1deb8486f1f70e5ad44cb65279e52e1ed64ba89 Mon Sep 17 00:00:00 2001 From: Jieiku Date: Tue, 31 May 2022 01:24:13 -0700 Subject: Seo Per Page --- config.toml | 9 +++++++-- static/site.webmanifest | 28 ++++++++++++++++++++++++++++ static/site.webmanifestB | 28 ---------------------------- 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 +++++++++++++++ 11 files changed, 193 insertions(+), 31 deletions(-) create mode 100644 static/site.webmanifest delete mode 100644 static/site.webmanifestB diff --git a/config.toml b/config.toml index 9fcf7d5..a60f041 100644 --- a/config.toml +++ b/config.toml @@ -1,6 +1,6 @@ base_url = "https://jieiku.github.io/abridge-demo/" -title = "abridge - Zola Theme" -description = "abridge is a fast and lightweight Zola theme using semantic html, abridge.css class-light CSS, and No JS." +title = "Abridge" +description = "Abridge is a fast and lightweight Zola theme using semantic html, abridge.css class-light CSS, and No JS." default_language = "en" #theme = "abridge" @@ -30,6 +30,11 @@ smart_punctuation = false # `...` to `…`, `"quote"` to `“curly”` [extra] language_code = "en-US" +title_separator = "|" # Separator between title and title_addition, set as |, -, _, etc +# To disable title_addition but keep built in page additions eg, Posts page: "Abridge | Posts" set title_addition to an empty string +# To alwyas set the page title exactly eg "Abridge" then comment out the below line +title_addition = "Fast & Lightweight Zola Theme" # a default value for title addition + author = "Jake G" # Put Your Name here author_show = true # displays the author name on line with date, tags, categories readtime = true # displays the read time on line with date, tags, categories diff --git a/static/site.webmanifest b/static/site.webmanifest new file mode 100644 index 0000000..90130c2 --- /dev/null +++ b/static/site.webmanifest @@ -0,0 +1,28 @@ +{ + "name": "Abridge Zola Theme", + "short_name": "Abridge", + "start_url": "https://jieiku.github.io/abridge-demo/", + "description": "Fast & Lightweight Zola Theme", + "scope": "/", + "display": "standalone", + "theme_color": "#222222", + "background_color": "#111111", + "icons": [ + { + "src": "/android-chrome-192x192.png", + "sizes": "192x192", + "type": "image/png" + }, + { + "src": "/android-chrome-512x512.png", + "sizes": "512x512", + "type": "image/png" + }, + { + "src": "/android-chrome-192x192x128m.png", + "sizes": "192x192", + "type": "image/png", + "purpose": "maskable" + } + ] +} diff --git a/static/site.webmanifestB b/static/site.webmanifestB deleted file mode 100644 index b232dd4..0000000 --- a/static/site.webmanifestB +++ /dev/null @@ -1,28 +0,0 @@ -{ - "name": "Abridge Zola Theme", - "short_name": "Abridge", - "start_url": "https://jieiku.github.io/abridge-demo/", - "description": "Semantic, Lightweight, and Fast Zola Theme!", - "scope": "/", - "display": "standalone", - "theme_color": "#222222", - "background_color": "#111111", - "icons": [ - { - "src": "/android-chrome-192x192.png", - "sizes": "192x192", - "type": "image/png" - }, - { - "src": "/android-chrome-512x512.png", - "sizes": "512x512", - "type": "image/png" - }, - { - "src": "/android-chrome-192x192x128m.png", - "sizes": "192x192", - "type": "image/png", - "purpose": "maskable" - } - ] -} 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 %}