Add turbo:extendedHtml to item (#8)

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

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,
};
}
}