{#- Billeder i bundlen serveres som webp; markdown bruger bare . -#}
{%- set indhold = page.content %}
{%- for a in page.assets %}
{%- set fil = a | split(pat="/") | last %}
{%- set fra = 'src="' ~ config.base_url ~ page.path ~ fil ~ '"' %}
{%- if fil is ending_with(pat=".png") or fil is ending_with(pat=".jpg") or fil is ending_with(pat=".jpeg") or fil is ending_with(pat=".webp") %}
{%- set b = resize_image(path="blog/" ~ page.slug ~ "/" ~ fil, width=1200, height=10000, op="fit", format="webp", quality=80) %}
{%- set_global indhold = indhold | replace(from=fra, to='src="' ~ (b.url | replace(from=config.base_url, to="")) ~ '" width="' ~ b.width ~ '" height="' ~ b.height ~ '" loading="lazy" decoding="async"') %}
{%- else %}
{%- set_global indhold = indhold | replace(from=fra, to='src="' ~ page.path ~ fil ~ '"') %}
{%- endif %}
{%- endfor %}
{{ indhold | safe }}
{%- if not preview %}