Improve feed logic
This commit is contained in:
@ -6,5 +6,5 @@
|
|||||||
{%- set card = resize_image(path=page.colocated_path ~ page.extra.banner, width=1200, height=628, op="fill") -%}
|
{%- set card = resize_image(path=page.colocated_path ~ page.extra.banner, width=1200, height=628, op="fill") -%}
|
||||||
{{ card.url }}
|
{{ card.url }}
|
||||||
{%- else -%}
|
{%- else -%}
|
||||||
{{ get_url(path='card.png') }}
|
{{ get_url(path="card.png") }}
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
|
@ -26,12 +26,16 @@
|
|||||||
{%- include "partials/favicon.html" %}
|
{%- include "partials/favicon.html" %}
|
||||||
|
|
||||||
{%- if config.generate_feeds and config.feed_filenames %}
|
{%- if config.generate_feeds and config.feed_filenames %}
|
||||||
{%- for feed in config.feed_filenames %}
|
{% for feed in config.feed_filenames %}
|
||||||
<link rel="alternate" type={% if feed == "atom.xml" %}"application/atom+xml"{% else %}"application/rss+xml"{% endif %} title="{{ config.title }}" href="{{ get_url(path=feed) | safe }}" />
|
{% if feed == "atom.xml" %}
|
||||||
{%- endfor %}
|
<link rel="alternate" type="application/atom+xml" title="{{ config.title }} - Atom Feed" href="{{ get_url(path=feed) | safe }}">
|
||||||
{%- elif config.generate_feeds and config.feed_filenames | length > 0 %}
|
{% elif feed == "rss.xml" %}
|
||||||
<link rel="alternate" type={% if config.feed_filenames[0] == "atom.xml" %}"application/atom+xml"{% else %}"application/rss+xml"{% endif %} title="{{ config.title }}" href="{{ get_url(path=config.feed_filenames[0]) | safe }}" />
|
<link rel="alternate" type="application/rss+xml" title="{{ config.title }} - RSS Feed" href="{{ get_url(path=feed) | safe }}">
|
||||||
{%- endif %}
|
{% else %}
|
||||||
|
<link rel="alternate" href="{{ get_url(path=feed) | safe }}">
|
||||||
|
{% endif %}
|
||||||
|
{% endfor %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
{%- include "partials/variables.html" %}
|
{%- include "partials/variables.html" %}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user