fix(feeds.js): add require length attribute to enclosures with correct value
This commit is contained in:
parent
995202b1d6
commit
2dc119415d
4 changed files with 30 additions and 18 deletions
|
@ -31,7 +31,8 @@ permalink: "{{ feed.permalink }}.xml"
|
|||
<guid isPermaLink="false">{{ feedItem.url | generatePermalink: globals.url | encodeAmp }}</guid>
|
||||
<pubDate>{{ feedItem.date | date: "%a, %d %b %Y %H:%M:%S %z" }}</pubDate>
|
||||
{%- if feedItem.image -%}
|
||||
<enclosure url="{{ globals.cdn_url }}{{ feedItem.image | encodeAmp }}?class=w800" type="image/jpeg" />
|
||||
{%- assign enclosureUrl = globals.cdn_url | append: feedItem.image | append: "?class=w800" -%}
|
||||
<enclosure url="{{ globals.cdn_url }}{{ feedItem.image | encodeAmp }}?class=w800" length="{{ enclosureUrl | getRemoteFileSize }}" type="image/jpeg" />
|
||||
{%- endif -%}
|
||||
<description><![CDATA[
|
||||
{%- if feedItem.image -%}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue