mirror of
https://github.com/tcsenpai/obsidiangarden_netlify.git
synced 2025-06-06 20:55:21 +00:00
Properly use updated field from note in RSS feed
This commit is contained in:
parent
10a713d0d3
commit
cd0e8b98ee
@ -325,6 +325,11 @@ module.exports = function (eleventyConfig) {
|
|||||||
singleTags: ["link"]
|
singleTags: ["link"]
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
eleventyConfig.addFilter("dateToZulu", function(date){
|
||||||
|
if(!date) return "";
|
||||||
|
return new Date(date).toISOString("dd-MM-yyyyTHH:mm:ssZ");
|
||||||
|
});
|
||||||
eleventyConfig.addFilter("jsonify", function (variable) {
|
eleventyConfig.addFilter("jsonify", function (variable) {
|
||||||
return JSON.stringify(variable) || '""';
|
return JSON.stringify(variable) || '""';
|
||||||
});
|
});
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
{% else %}{{ note.fileSlug }}
|
{% else %}{{ note.fileSlug }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</title>
|
</title>
|
||||||
<updated>{{ (note.updated or note.date ) | dateToRfc3339 }}</updated>
|
<updated>{%if note.data.updated %}{{ note.data.updated | dateToZulu }}{%else%}{{ note.date | dateToRfc3339 }}{%endif%}</updated>
|
||||||
<id>{{ meta.siteBaseUrl }}{{note.url | url }}</id>
|
<id>{{ meta.siteBaseUrl }}{{note.url | url }}</id>
|
||||||
<content type="html">
|
<content type="html">
|
||||||
{{ note.templateContent | hideDataview | link | taggify | htmlToAbsoluteUrls(meta.siteBaseUrl) }}
|
{{ note.templateContent | hideDataview | link | taggify | htmlToAbsoluteUrls(meta.siteBaseUrl) }}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user