Add turbo:extendedHtml to item (#8)

This commit is contained in:
Dmitriy authored and GitHub committed 2021-11-03 19:50:58 +03:00
1 parent ba8fe7ed26
commit 5c8fbfaa40
3 files changed
+15 -1

No files matched your search

+2
View File
@@ -146,6 +146,7 @@ class TR {
itemValues.push({_attr: {'turbo': item.turboEnabled ? 'true' : 'false'}});
itemValues.push({link: item.url});
self.pushIfConditionTrue(item.extendedHtml, itemValues, {'turbo:extendedHtml': 'true'});
self.pushIfConditionTrue(item.turboSource, itemValues, {'turbo:source': item.turboSource});
self.pushIfConditionTrue(item.turboTopic, itemValues, {'turbo:topic': item.turboTopic});
self.pushIfConditionTrue(item.date, itemValues, {pubDate: new Date(item.date).toUTCString()});
@@ -218,6 +219,7 @@ class TR {
turboTopic: data.turboTopic || '',
goals: data.goals || [],
turboEnabled: data.turboEnabled !== undefined ? data.turboEnabled : true,
extendedHtml: data.extendedHtml || false,
};
}
}