mirror of
https://github.com/tcsenpai/obsidiangarden_netlify.git
synced 2025-06-04 12:00:02 +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"]
|
||||
}
|
||||
});
|
||||
|
||||
eleventyConfig.addFilter("dateToZulu", function(date){
|
||||
if(!date) return "";
|
||||
return new Date(date).toISOString("dd-MM-yyyyTHH:mm:ssZ");
|
||||
});
|
||||
eleventyConfig.addFilter("jsonify", function (variable) {
|
||||
return JSON.stringify(variable) || '""';
|
||||
});
|
||||
|
@ -18,7 +18,7 @@
|
||||
{% else %}{{ note.fileSlug }}
|
||||
{% endif %}
|
||||
</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>
|
||||
<content type="html">
|
||||
{{ note.templateContent | hideDataview | link | taggify | htmlToAbsoluteUrls(meta.siteBaseUrl) }}
|
||||
|
Loading…
x
Reference in New Issue
Block a user