mirror of
https://github.com/svemagie/blog-eleventy-indiekit.git
synced 2026-05-15 23:18:51 +02:00
debug: add raw URL debug output
This commit is contained in:
@@ -22,10 +22,12 @@ permalink: /photos/
|
|||||||
<pre style="display:none" class="debug-photo">{{ post.data.photo | dump | safe }}</pre>
|
<pre style="display:none" class="debug-photo">{{ post.data.photo | dump | safe }}</pre>
|
||||||
<div class="photo-gallery">
|
<div class="photo-gallery">
|
||||||
{% for img in post.data.photo %}
|
{% for img in post.data.photo %}
|
||||||
|
<pre style="display:none" class="debug-url">RAW:{{ img.url }}:END</pre>
|
||||||
{% set photoUrl = img.url %}
|
{% set photoUrl = img.url %}
|
||||||
{% if photoUrl and photoUrl[0] != '/' and 'http' not in photoUrl %}
|
{% if photoUrl and photoUrl[0] != '/' and 'http' not in photoUrl %}
|
||||||
{% set photoUrl = '/' + photoUrl %}
|
{% set photoUrl = '/' + photoUrl %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
<pre style="display:none" class="debug-final">FINAL:{{ photoUrl }}:END</pre>
|
||||||
<a href="{{ post.url }}" class="photo-link">
|
<a href="{{ post.url }}" class="photo-link">
|
||||||
<img src="{{ photoUrl }}" alt="{{ img.alt | default('Photo') }}" class="u-photo" loading="lazy">
|
<img src="{{ photoUrl }}" alt="{{ img.alt | default('Photo') }}" class="u-photo" loading="lazy">
|
||||||
</a>
|
</a>
|
||||||
|
|||||||
Reference in New Issue
Block a user