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") -%}
|
||||
{{ card.url }}
|
||||
{%- else -%}
|
||||
{{ get_url(path='card.png') }}
|
||||
{{ get_url(path="card.png") }}
|
||||
{%- endif -%}
|
||||
|
@ -26,12 +26,16 @@
|
||||
{%- include "partials/favicon.html" %}
|
||||
|
||||
{%- if config.generate_feeds and 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 }}" />
|
||||
{%- endfor %}
|
||||
{%- elif config.generate_feeds and config.feed_filenames | length > 0 %}
|
||||
<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 }}" />
|
||||
{%- endif %}
|
||||
{% for feed in config.feed_filenames %}
|
||||
{% if feed == "atom.xml" %}
|
||||
<link rel="alternate" type="application/atom+xml" title="{{ config.title }} - Atom Feed" href="{{ get_url(path=feed) | safe }}">
|
||||
{% elif feed == "rss.xml" %}
|
||||
<link rel="alternate" type="application/rss+xml" title="{{ config.title }} - RSS Feed" href="{{ get_url(path=feed) | safe }}">
|
||||
{% else %}
|
||||
<link rel="alternate" href="{{ get_url(path=feed) | safe }}">
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
|
||||
{%- include "partials/variables.html" %}
|
||||
|
||||
|
Reference in New Issue
Block a user