From 08f406c44c861a914c8b63fab454250f8a4c4b36 Mon Sep 17 00:00:00 2001
From: Jieiku
Date: Wed, 20 Sep 2023 00:25:21 -0700
Subject: refactor nav, blocks, macros, templates. fix image shortcodes
---
templates/macros/seo.html | 140 ++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 140 insertions(+)
create mode 100644 templates/macros/seo.html
(limited to 'templates/macros/seo.html')
diff --git a/templates/macros/seo.html b/templates/macros/seo.html
new file mode 100644
index 0000000..8d2ada1
--- /dev/null
+++ b/templates/macros/seo.html
@@ -0,0 +1,140 @@
+{#- type: website or article, generally setting article for blog articles -#}
+{#- page_images: using for the blog single template page -#}
+{#- page_section: the blog single template page have to pass the parameter -#}
+{#- is_404: using for the 404.html template -#}
+
+{%- macro seo( config, title="", title_addition="", description="", type="website", is_home=false, is_404=false, is_page=false, page_images="", page_section="", created_time="2023-05-15T07:07:00-07:00", updated_time="2023-05-15T07:07:00-07:00" ) %}
+
+{%- if is_404 -%}
+
+{%- else -%}
+
+
+
+{%- endif -%}
+
+{%- if current_url %}
+ {%- set page_url = current_url %}
+{%- else %}
+ {%- set page_url = get_url(path="404.html", trailing_slash=true) %}
+{%- endif %}
+
{{ 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 and config.extra.keywords %}
+
+{%- elif page.extra.keywords %}
+
+{%- elif config.extra.keywords %}
+
+{%- endif %}
+
+{#- Extra SEO START #}
+{%- if config.extra.seo | default(value=true) %}
+{%- 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.twitter_meta %}
+
+
+{%- endif %}
+
+
+
+{%- endif %}
+{%- endif %}
+{#- Extra SEO END #}
+{%- endmacro %}
--
cgit v1.3.1