From 8ea85377a23501cfd01df3831e2b10464ac7666c Mon Sep 17 00:00:00 2001 From: Valentin Gagarin Date: Sat, 13 Apr 2024 00:57:14 +0200 Subject: [PATCH 01/11] strip whitespace --- themes/adidoks/templates/404.html | 8 ++++---- themes/adidoks/templates/authors/single.html | 10 +++++----- themes/adidoks/templates/base.html | 2 +- themes/adidoks/templates/index.html | 8 ++++---- themes/adidoks/templates/macros/docs-sidebar.html | 4 ++-- themes/adidoks/templates/page.html | 6 +++--- themes/adidoks/templates/section.html | 6 +++--- 7 files changed, 22 insertions(+), 22 deletions(-) diff --git a/themes/adidoks/templates/404.html b/themes/adidoks/templates/404.html index bba426f..b3f4351 100644 --- a/themes/adidoks/templates/404.html +++ b/themes/adidoks/templates/404.html @@ -1,17 +1,17 @@ {% extends "base.html" %} {% block seo %} - {{ super() }} + {{ super() }} {% set title = "404 Page not found" %} - + {% 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_404=true) }} {% endblock seo %} diff --git a/themes/adidoks/templates/authors/single.html b/themes/adidoks/templates/authors/single.html index 6632181..432b776 100644 --- a/themes/adidoks/templates/authors/single.html +++ b/themes/adidoks/templates/authors/single.html @@ -3,7 +3,7 @@ {% block seo %} {% set author_name_in_url = term.permalink | trim_end_matches(pat="/") | split(pat="/") | last %} {% set section = get_section(path="authors/_index.md") %} - + {% if section.extra.author_pages[author_name_in_url] %} {% set_global author_page = get_page(path=section.extra.author_pages[author_name_in_url])%} {% endif %} @@ -12,26 +12,26 @@ {% else %} {% set_global title = term.name %} {% endif %} - + {% set title_addition = "" %} {% if config.extra.title_separator %} {% set title_separator = " " ~ config.extra.title_separator ~ " " %} {% else %} {% set title_separator = " | " %} {% endif %} - + {% if config.title %} {% set title_addition = title_separator ~ config.title %} {% else %} {% set title_addition = "" %} {% endif %} - + {% if author_page and author_page.description %} {% set description = author_page.description %} {% else %} {% set description = config.description %} {% endif %} - + {{ macros_head::seo(title=title, title_addition=title_addition, description=description) }} {% endblock seo %} diff --git a/themes/adidoks/templates/base.html b/themes/adidoks/templates/base.html index 53b4396..49721fd 100644 --- a/themes/adidoks/templates/base.html +++ b/themes/adidoks/templates/base.html @@ -49,6 +49,6 @@ {{ macros_footer::footer() }} {% endblock footer %} - {{ macros_js::javascript() }} + {{ macros_js::javascript() }} diff --git a/themes/adidoks/templates/index.html b/themes/adidoks/templates/index.html index aa9fec5..fd0cd96 100644 --- a/themes/adidoks/templates/index.html +++ b/themes/adidoks/templates/index.html @@ -8,7 +8,7 @@ {% else %} {% set title = "" %} {% endif %} - + {% if config.extra.title_addition and title %} {% set title_addition = title_separator ~ config.extra.title_addition %} {% elif config.extra.title_addition %} @@ -16,9 +16,9 @@ {% 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 %} @@ -54,7 +54,7 @@

Security aware

Get A+ scores on Mozilla Observatory out of the box. Easily change the default Security Headers to suit your needs.

-
+

Fast by default ⚡️

Get 100 scores on Google Lighthouse by default. Doks removes unused css, prefetches links, and lazy loads images.

diff --git a/themes/adidoks/templates/macros/docs-sidebar.html b/themes/adidoks/templates/macros/docs-sidebar.html index dfe45bd..c0bc5d6 100644 --- a/themes/adidoks/templates/macros/docs-sidebar.html +++ b/themes/adidoks/templates/macros/docs-sidebar.html @@ -6,7 +6,7 @@ {% if index.pages %}

{{ index.title }}

@@ -17,7 +17,7 @@ {% if subsection.pages %}

{{ subsection.title }}

diff --git a/themes/adidoks/templates/page.html b/themes/adidoks/templates/page.html index 54873bd..4a412c0 100644 --- a/themes/adidoks/templates/page.html +++ b/themes/adidoks/templates/page.html @@ -13,7 +13,7 @@ {% else %} {% set title = config.title %} {% endif %} - + {% if page.description %} {% set description = page.description %} {% else %} @@ -26,10 +26,10 @@ {% 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 body %} {% if section.extra.class %} {% set page_class = page.extra.class %} diff --git a/themes/adidoks/templates/section.html b/themes/adidoks/templates/section.html index c996fb6..dac4f7b 100644 --- a/themes/adidoks/templates/section.html +++ b/themes/adidoks/templates/section.html @@ -5,7 +5,7 @@ {% block seo %} {{ super() }} {% set title_addition = "" %} - + {% if section.title and config.title %} {% set title = section.title %} {% set title_addition = title_separator ~ config.title %} @@ -14,13 +14,13 @@ {% else %} {% set title = config.title %} {% endif %} - + {% if section.description %} {% set description = section.description %} {% else %} {% set description = config.description %} {% endif %} - + {{ macros_head::seo(title=title, title_addition=title_addition, description=description) }} {% endblock seo %} -- 2.45.2 From eea9953bdfeaa4c8d460aaf696cf798f02ee0733 Mon Sep 17 00:00:00 2001 From: Valentin Gagarin Date: Sat, 13 Apr 2024 01:30:44 +0200 Subject: [PATCH 02/11] remove unused menu entry definitions --- config.toml | 14 -------------- themes/adidoks/templates/macros/header.html | 6 ------ 2 files changed, 20 deletions(-) diff --git a/config.toml b/config.toml index 6d78236..18eda7f 100644 --- a/config.toml +++ b/config.toml @@ -103,20 +103,6 @@ url = "https://git.clan.lol/clan/clan-core" post = "v0.1.0" weight = 20 - -# Menu items -[[extra.menu.main]] -name = "Docs" -section = "docs" -url = "/docs/getting-started/introduction/" -weight = 10 - -[[extra.menu.main]] -name = "Blog" -section = "blog" -url = "/blog/" -weight = 20 - # Footer contents [extra.footer] info = 'Powered by Zola, and AdiDoks' diff --git a/themes/adidoks/templates/macros/header.html b/themes/adidoks/templates/macros/header.html index e063692..4ff5057 100644 --- a/themes/adidoks/templates/macros/header.html +++ b/themes/adidoks/templates/macros/header.html @@ -51,12 +51,6 @@ {{ val.name }} {% endfor %} - {% elif config.extra.menu.main %} - {% for val in config.extra.menu.main %} - - {% endfor %} {% else %}