From e55841149d9259f26f4d117daba34b5666a52097 Mon Sep 17 00:00:00 2001 From: Benedikt Peetz Date: Fri, 11 Sep 2026 22:02:29 +0200 Subject: src/themes/serene: Update to newest version --- src/themes/serene/templates/_components/seo.html | 39 ++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 src/themes/serene/templates/_components/seo.html (limited to 'src/themes/serene/templates/_components/seo.html') diff --git a/src/themes/serene/templates/_components/seo.html b/src/themes/serene/templates/_components/seo.html new file mode 100644 index 0000000..361d7d2 --- /dev/null +++ b/src/themes/serene/templates/_components/seo.html @@ -0,0 +1,39 @@ +{% component seo(title, desc, config, url = "", page_type = "website", image = "", colocated_path = "", published = "", updated = "", tags = [], lang = "") %} +{%- set og_image = "" -%} +{%- if image -%} + {%- if image is starting_with(pat="http://") or image is starting_with(pat="https://") or image is starting_with(pat="//") -%} + {%- set og_image = image -%} + {%- elif image is starting_with(pat="/") -%} + {%- set og_image = get_url(path=image) -%} + {%- elif colocated_path -%} + {%- set og_image = get_url(path=colocated_path ~ image) -%} + {%- else -%} + {%- set og_image = get_url(path=image) -%} + {%- endif -%} +{%- elif config.extra.og_image -%} + {%- if config.extra.og_image is starting_with(pat="http://") or config.extra.og_image is starting_with(pat="https://") or config.extra.og_image is starting_with(pat="//") -%} + {%- set og_image = config.extra.og_image -%} + {%- else -%} + {%- set og_image = get_url(path=config.extra.og_image) -%} + {%- endif -%} +{%- endif -%} + +{% if url %}{% endif %} + + + + +{% if url %}{% endif %} +{% if lang %}{% endif %} +{% if og_image %}{% endif %} +{% if page_type == "article" %} +{% if published %}{% endif %} +{% if updated %}{% endif %} +{% if tags %}{% for tag in tags %} +{% endfor %}{% endif %} +{% endif %} + + + +{% if og_image %}{% endif %} +{% endcomponent seo %} -- cgit v1.3.1