aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJieiku2022-05-31 01:24:13 -0700
committerJieiku2022-05-31 01:24:13 -0700
commitd1deb8486f1f70e5ad44cb65279e52e1ed64ba89 (patch)
treed8b39996de28b4ec3273f05da22c6b3e8fb57c61
parent0199ea6e9b76541e89b4e2749848bdb1c39d42aa (diff)
downloadabridge-d1deb8486f1f70e5ad44cb65279e52e1ed64ba89.tar.gz
abridge-d1deb8486f1f70e5ad44cb65279e52e1ed64ba89.tar.bz2
abridge-d1deb8486f1f70e5ad44cb65279e52e1ed64ba89.zip
Seo Per Page
-rw-r--r--config.toml9
-rw-r--r--static/site.webmanifest (renamed from static/site.webmanifestB)2
-rw-r--r--templates/categories/list.html15
-rw-r--r--templates/categories/single.html15
-rw-r--r--templates/contact.html24
-rw-r--r--templates/page.html32
-rw-r--r--templates/pages.html25
-rw-r--r--templates/posts.html18
-rw-r--r--templates/tags/list.html15
-rw-r--r--templates/tags/single.html15
10 files changed, 166 insertions, 4 deletions
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.webmanifestB b/static/site.webmanifest
index b232dd4..90130c2 100644
--- a/static/site.webmanifestB
+++ b/static/site.webmanifest
@@ -2,7 +2,7 @@
"name": "Abridge Zola Theme",
"short_name": "Abridge",
"start_url": "https://jieiku.github.io/abridge-demo/",
- "description": "Semantic, Lightweight, and Fast Zola Theme!",
+ "description": "Fast & Lightweight Zola Theme",
"scope": "/",
"display": "standalone",
"theme_color": "#222222",
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 %}
<div>
<center>
diff --git a/templates/categories/single.html b/templates/categories/single.html
index 0fe639d..f1c5cfe 100644
--- a/templates/categories/single.html
+++ b/templates/categories/single.html
@@ -1,5 +1,20 @@
{% extends "base.html" %}
+{%- block seo %}
+ {{- super() }}
+ {%- set title = term.name ~ " category" %}
+
+ {%- 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 %}
<div>
<h2>{{ term.name }}</h2>
diff --git a/templates/contact.html b/templates/contact.html
index 7304551..eabb00f 100644
--- a/templates/contact.html
+++ b/templates/contact.html
@@ -1,5 +1,29 @@
+{# This Page Shows the contact page eg: example.com/contact/ #}
+
{% extends "base.html" %}
+{%- 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 %}
+
+ {{- macros_head::seo(title=title, title_addition=title_addition, description=description) }}
+{%- endblock seo %}
+
{%- block content %}
<div>
<p>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!</p>
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 %}
<article>
{{- macros::title(page=page) }}
diff --git a/templates/pages.html b/templates/pages.html
index a9147c7..38dfd7f 100644
--- a/templates/pages.html
+++ b/templates/pages.html
@@ -1,4 +1,29 @@
+{# This Page Shows the 'Pages' (abridge/content/pages) eg: example.com/about/ example.com/privacy/ #}
+
{% extends "base.html" %}
+
+{%- 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 %}
+
+ {{- macros_head::seo(title=title, title_addition=title_addition, description=description) }}
+{%- endblock seo %}
+
{%- block content %}
<div>
{{ page.content | safe }}
diff --git a/templates/posts.html b/templates/posts.html
index 3d4184d..bd5d0d8 100644
--- a/templates/posts.html
+++ b/templates/posts.html
@@ -1,4 +1,22 @@
+{# This Page Shows the Posts Grouped by Year: example.com/posts/ #}
+
{% extends "base.html" %}
+
+{%- block seo %}
+ {{- super() }}
+ {%- set title = "Posts" %}
+
+ {%- 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 %}
{%- set section_item = get_section(path="_index.md") %}
<div>
diff --git a/templates/tags/list.html b/templates/tags/list.html
index 2dd3497..e03b6df 100644
--- a/templates/tags/list.html
+++ b/templates/tags/list.html
@@ -1,5 +1,20 @@
{% extends "base.html" %}
+{%- block seo %}
+ {{- super() }}
+ {%- set title = "Tags" %}
+
+ {%- 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 %}
<div>
<center>
diff --git a/templates/tags/single.html b/templates/tags/single.html
index d9d03eb..b4428ff 100644
--- a/templates/tags/single.html
+++ b/templates/tags/single.html
@@ -1,5 +1,20 @@
{% extends "base.html" %}
+{%- block seo %}
+ {{- super() }}
+ {%- set title = term.name ~ " tag" %}
+
+ {%- 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 %}
<div>
<h2>{{ term.name }}</h2>