🎨 style: fix whitespace issues

This commit is contained in:
welpo
2023-10-07 23:31:59 +02:00
parent 8aabeaecc3
commit 5458b1c533
16 changed files with 35 additions and 35 deletions

View File

@@ -8,27 +8,27 @@
data-goatcounter="{{ self_hosted_url ~ '/count' }}"
src="{{ self_hosted_url ~ '/count.js' }}"
{% else %}
data-goatcounter="https://{{ analytics_id }}.goatcounter.com/count"
data-goatcounter="https://{{ analytics_id }}.goatcounter.com/count"
src="https://gc.zgo.at/count.js"
{% endif %}
></script>
{% elif analytics_service == "umami" %}
<script async defer
<script async defer
{% if self_hosted_url %}
data-website-id="{{ analytics_id }}"
data-website-id="{{ analytics_id }}"
src="{{ self_hosted_url ~ '/umami.js' }}"
{% else %}
data-website-id="{{ analytics_id }}"
data-website-id="{{ analytics_id }}"
src="https://analytics.eu.umami.is/script.js"
{% endif %}
data-do-not-track="true">
</script>
{% elif analytics_service == "plausible" %}
<script
defer
data-domain="{{ analytics_id }}"
<script
defer
data-domain="{{ analytics_id }}"
src="{% if self_hosted_url %}{{ self_hosted_url ~ '/js/plausible.js' }}{% else %}https://plausible.io/js/script.js{% endif %}"
></script>

View File

@@ -11,7 +11,7 @@
{%- endif -%}
{% set target_url = page.extra.link_to | default(value=page.permalink) %}
<a rel="{{ rel_attributes }}" {{ blank_target }} href="{{ target_url }}">
{% if page.extra.local_image %}
{% set meta = get_image_metadata(path=page.extra.local_image, allow_missing=true) %}

View File

@@ -16,7 +16,7 @@
{# Feed #}
<link rel="alternate" type="application/atom+xml" title="{{ config.title | safe }}" href="{{ get_url(path="atom.xml",
trailing_slash=false) }}">
{# CSS #}
{# Load subset of glyphs for header. Avoids flashing issue in Firefox #}
{% if config.extra.custom_subset and config.extra.custom_subset == true %}
@@ -49,7 +49,7 @@
{%- for stylesheet in stylesheets %}
<link rel="stylesheet" href="{{ get_url(path=stylesheet, cachebust=true) | safe }}" />
{%- endfor %}
<meta name="color-scheme" content="{%- if config.extra.theme_switcher -%}light dark{%- elif config.extra.default_theme -%}{{config.extra.default_theme}}{%- else -%}light{%- endif -%}" />
{%- if config.extra.browser_theme_color and config.extra.browser_theme_color is iterable -%}
@@ -90,10 +90,10 @@
{# Try to construct the image path relative to the current page #}
{% set colocated_path = page.colocated_path | default(value="") %}
{% set file_path = colocated_path ~ social_media_card %}
{# Fetch metadata to verify image existence at the relative path #}
{%- set meta = get_image_metadata(path=file_path, allow_missing=true) -%}
{# Check if relative path exists, else try absolute path #}
{% if meta %}
{% set final_path = file_path %}
@@ -107,7 +107,7 @@
{{ throw(message="Could not get metadata for the specified social media card image in page " ~ page.path ~ ". Attempted relative path: '" ~ file_path ~ "' and absolute path: '" ~ social_media_card ~ "'. Ensure the file exists at one of these locations.") }}
{% endif %}
{% endif %}
{# Generate the social media meta tags #}
<meta property="og:image" content="{{ get_url(path=final_path, cachebust=true) }}" />
<meta property="og:image:width" content="{{ meta.width }}" />
@@ -131,7 +131,7 @@
{%- set canonical_url = current_url | replace(from=config.base_url, to=config.extra.base_canonical_url) -%}
{%- endif -%}
{%- endif -%}
{# Add canonical URL, if set #}
{%- if canonical_url -%}
<link rel="canonical" href="{{ canonical_url }}" />
@@ -139,7 +139,7 @@
{%- elif current_url -%}
<meta property="og:url" content="{{ current_url }}" />
{%- endif -%}
<meta property="og:site_name" content="{{ config.title }}">
{%- include "partials/content_security_policy.html" -%}