mirror of
https://github.com/ParkerTenBroeck/ParkerTenBroeck.github.io.git
synced 2026-06-07 05:18:40 -04:00
photos properly included in RSS and Atom feed
This commit is contained in:
parent
792646c68d
commit
b106d42f4d
4 changed files with 111 additions and 2 deletions
|
|
@ -1,3 +1,5 @@
|
|||
{% import "macros/figures.html" as figures %}
|
||||
|
||||
{%- macro link_alternate(filename, title) -%}
|
||||
{%- if filename is ending_with("atom.xml") -%}
|
||||
{%- set type = 'type="application/atom+xml" ' -%}
|
||||
|
|
@ -7,4 +9,15 @@
|
|||
{%- set type = 'type="application/feed+json" ' -%}
|
||||
{%- endif -%}
|
||||
<link rel="alternate" {{ type | default(value="") | safe -}} href="{{ get_url(path=filename) }}" title="{{ title | replace(from='"', to=""") | safe }}">
|
||||
{%- endmacro -%}
|
||||
{%- endmacro -%}
|
||||
|
||||
|
||||
|
||||
{%- macro content(page) -%}
|
||||
|
||||
{%if page.taxonomies.category is containing("photo") %}
|
||||
{{ figures::image(src=page.extra.picture_src, caption=page.description) }}
|
||||
{% else %}
|
||||
{% if page.summary %}{{ page.summary }}{% else %}{{ page.content }}{% endif %}
|
||||
{% endif %}
|
||||
{%- endmacro -%}
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
{# {% set image = resize_image(path=src, height=mdata.height, width=mdata.width, format="webp") %} #}
|
||||
|
||||
<figure class="{% if class %} {{ class }} {% endif %}">
|
||||
<img src="{{ get_url(path=src) }}" loading="lazy" height="{{mdata.height}}" width="{{mdata.width}}" alt="{{caption | default(value='')}}" decoding="async" class="zoomable">
|
||||
<img src="{{ get_url(path=src) }}" loading="lazy" height="{{mdata.height}}" width="{{mdata.width}}" alt="{{caption | default(value='')}}" decoding="async" class="zoomable"/>
|
||||
{% if caption != "" %}
|
||||
<figcaption>{{ caption | markdown() | safe }}</figcaption>
|
||||
{% endif %}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue