Fix post image URL and add description
This commit is contained in:
parent
75eb02a75a
commit
5e24e8f234
@ -17,16 +17,17 @@ permalink: /feed/feed.xml
|
||||
</author>
|
||||
{%- for post in collections.posts | reverse %}
|
||||
{% set absolutePostUrl %}{{ post.url | htmlBaseUrl(metadata.url) }}{% endset %}
|
||||
{% if post.image-url %}{% set imageURL %}{{ post.image-url | htmlBaseUrl(metadata.url) }}{% endset %}{% endif %}
|
||||
{% if post.data.imageURL %}{% set imageURL %}{{ post.data.imageURL | htmlBaseUrl(metadata.url) }}{% endset %}{% endif %}
|
||||
{% set defaultImageURL %}{{ metadata.defaultPostImageURL | htmlBaseUrl(metadata.url) }}{% endset %}
|
||||
<entry>
|
||||
<title>{{ post.data.title }}</title>
|
||||
<description>{{ post.data.description | truncate(150) }}</description>
|
||||
<link href="{{ absolutePostUrl }}"/>
|
||||
<updated>{{ post.date | dateToRfc3339 }}</updated>
|
||||
<id>{{ absolutePostUrl }}</id>
|
||||
<image>
|
||||
<url>{% if post.image-url %}{{ imageURL }}{% else %}{{ defaultImageURL }}{% endif %}</url>
|
||||
<title>{% if post.image-alt %}{{ post.image-alt }}{% else %}{{ metadata.defaultPostImageAlt }}{% endif %}</title>
|
||||
<url>{% if post.data.imageURL %}{{ imageURL }}{% else %}{{ defaultImageURL }}{% endif %}</url>
|
||||
<title>{% if post.data.imageAlt %}{{ post.data.imageAlt }}{% else %}{{ metadata.defaultPostImageAlt }}{% endif %}</title>
|
||||
<link href="{{ absolutePostUrl }}"/>
|
||||
</image>
|
||||
<content type="html">{{ post.templateContent | transformWithHtmlBase(absolutePostUrl, post.url) }}</content>
|
||||
|
Loading…
x
Reference in New Issue
Block a user