From 31395878a127a6dd474da50c2f93956588aa2135 Mon Sep 17 00:00:00 2001
From: Jieiku
Date: Tue, 31 May 2022 03:00:20 -0700
Subject: HTML5 Validation & Cleanup
---
templates/macros/head.html | 120 +++++++++++++++++++++----------------------
templates/macros/social.html | 86 +++++++++++++++----------------
2 files changed, 102 insertions(+), 104 deletions(-)
(limited to 'templates/macros')
diff --git a/templates/macros/head.html b/templates/macros/head.html
index 9e4d59f..f6090a6 100644
--- a/templates/macros/head.html
+++ b/templates/macros/head.html
@@ -1,32 +1,32 @@
{%- macro stylesheet() %}
-
+
{%- endmacro %}
{%- macro resource() %}
{%- if config.extra.fonts %}{%- for i in config.extra.fonts %}
{%- if i.url is matching("^http[s]?://") %}
-
+
{%- else %}
-
+
{%- endif %}
{%- endfor %}{%- endif %}
{%- if config.extra.fontawesome %}
-
+
{%- endif %}
{%- if config.build_search_index %}
{%- if config.extra.js_search_index %}
-
+
{%- endif %}
{%- if config.extra.js_search %}
-
+
{%- endif %}
{%- endif %}
{%- if config.generate_feed %}
-
+
{%- endif %}
{%- endmacro %}
@@ -34,19 +34,19 @@
{%- macro favicons() %}
{%- if config.extra.favicon_theme_color %}
-
+
{%- endif %}
{%- if config.extra.favicon_ms_color %}
-
+
{%- endif %}
{%- if config.extra.favicon_webmanifest %}
-
+
{%- endif %}
{%- if config.extra.favicon_mask and config.extra.favicon_mask_color %}
-
+
{%- endif %}
{%- if config.extra.favicon180 %}
@@ -69,11 +69,11 @@
{#- is_404: using for the 404.html template -#}
{%- macro seo( title="",title_addition="",description="",type="website",is_home=false,is_404=false,is_page=false,page_images="",page_section="",created_time="2021-07-04T07:07:00-07:00", updated_time="2021-07-04T07:07:00-07:00" ) %}
{%- if is_404 -%}
-
+
{%- else -%}
-
-
-
+
+
+
{%- endif -%}
{%- if current_url %}
@@ -84,25 +84,25 @@
{{ title ~ title_addition }}
{%- if config.extra.author %}
-
+
{%- endif %}
{%- if config.extra.facebook_publisher %}
-
+
{%- endif %}
-
+
{%- if config.extra.facebook_author %}
-
+
{%- endif %}
{%- if page.description %}
{%- else %}
{%- endif %}
-
+
{%- if page.extra.keywords %}
-
+
{%- else %}
-
+
{%- endif %}
{#- Extra SEO START #}
@@ -110,87 +110,87 @@
{%- if not is_404 %}
{%- if config.extra.google %}
-
+
{%- endif %}
{%- if config.extra.bing %}
-
+
{%- endif %}
-
-
+
+
{%- if page.description %}
-
-
+
+
{%- else %}
-
-
+
+
{%- endif %}
{%- if page.title %}
-
-
+
+
{%- else %}
-
-
+
+
{%- endif %}
{#- SEO MEDIA START #}
{%- if page.extra.thumbnail %}
-
-
-
+
+
+
{%- elif page.extra.static_thumbnail %}
-
+
{%- if page.extra.static_thumbnail is matching("^http[s]?://") %}
-
-
+
+
{%- else %}
-
-
+
+
{%- endif %}
{%- elif config.extra.banner %}
-
-
-
+
+
+
{%- else %}
-
+
{%- endif %}
{%- if config.extra.open.audio %}
-
+
{%- endif %}
{%- if config.extra.open.locale %}
-
+
{%- endif %}
{%- if config.extra.open.videos %}
{%- for video in config.extra.open.videos %}
-
+
{%- endfor %}
{%- endif %}
{#- SEO MEDIA END #}
-
-
-
+
+
+
{%- if page.updated %}
-
+
{%- elif page.date %}
-
+
{%- else %}
-
+
{%- endif %}
{%- if config.extra.social.twitter %}
-
-
+
+
{%- endif %}
@@ -202,10 +202,10 @@
{%- macro security() %}
{%- if config.extra.security_header_referrer %}
-
+
{%- endif %}
{%- if config.extra.security_header_csp %}
-
+
{%- endif %}
{%- endmacro %}
@@ -214,7 +214,7 @@
{# https://github.com/KaTeX/KaTeX/tree/main/contrib/mathtex-script-type/ #}
{%- macro math() %}
{%- if config.extra.math or page.extra.math %}
-
+
{%- if config.extra.math_auto_render or page.extra.math_auto_render %}
diff --git a/templates/macros/social.html b/templates/macros/social.html
index d34fb29..c1b0726 100644
--- a/templates/macros/social.html
+++ b/templates/macros/social.html
@@ -1,47 +1,45 @@
{%- macro social_links(social_config) %}
{%- set base_url = get_url(path="", lang=lang) %}
-
- {%- if config.generate_feed %}{%- if config.extra.social.feed %}
- {% endif %}{% endif %}
- {%- if social_config.mail %}
- {% endif %}
- {%- if social_config.mastodon %}
- {% endif %}
- {%- if social_config.element %}
- {% endif %}
- {%- if social_config.matrix %}
- {% endif %}
- {%- if social_config.twitter %}
- {% endif %}
- {%- if social_config.facebook %}
- {% endif %}
- {%- if social_config.linkedin %}
- {% endif %}
- {%- if social_config.researchgate %}
- {% endif %}
- {%- if social_config.gitlab %}
- {% endif %}
- {%- if social_config.github %}
- {% endif %}
- {%- if social_config.bitbucket %}
- {% endif %}
- {%- if social_config.python %}
- {% endif %}
- {%- if social_config.docker %}
- {% endif %}
- {%- if social_config.stack %}
- {% endif %}
- {%- if social_config.instagram %}
- {% endif %}
- {%- if social_config.pinterest %}
- {% endif %}
- {%- if social_config.twitch %}
- {% endif %}
- {%- if social_config.youtube %}
- {% endif %}
- {%- if social_config.buymeacoffee %}
- {% endif %}
- {%- if social_config.github_sponsor %}
- {% endif %}
-
+ {%- if config.generate_feed %}{%- if config.extra.social.feed %}
+ {% endif %}{% endif %}
+ {%- if social_config.mail %}
+ {% endif %}
+ {%- if social_config.mastodon %}
+ {% endif %}
+ {%- if social_config.element %}
+ {% endif %}
+ {%- if social_config.matrix %}
+ {% endif %}
+ {%- if social_config.twitter %}
+ {% endif %}
+ {%- if social_config.facebook %}
+ {% endif %}
+ {%- if social_config.linkedin %}
+ {% endif %}
+ {%- if social_config.researchgate %}
+ {% endif %}
+ {%- if social_config.gitlab %}
+ {% endif %}
+ {%- if social_config.github %}
+ {% endif %}
+ {%- if social_config.bitbucket %}
+ {% endif %}
+ {%- if social_config.python %}
+ {% endif %}
+ {%- if social_config.docker %}
+ {% endif %}
+ {%- if social_config.stack %}
+ {% endif %}
+ {%- if social_config.instagram %}
+ {% endif %}
+ {%- if social_config.pinterest %}
+ {% endif %}
+ {%- if social_config.twitch %}
+ {% endif %}
+ {%- if social_config.youtube %}
+ {% endif %}
+ {%- if social_config.buymeacoffee %}
+ {% endif %}
+ {%- if social_config.github_sponsor %}
+ {% endif %}
{%- endmacro %}
--
cgit v1.3.1