diff options
Diffstat (limited to 'src/content/dependencies/generateCommentarySection.js')
-rw-r--r-- | src/content/dependencies/generateCommentarySection.js | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/src/content/dependencies/generateCommentarySection.js b/src/content/dependencies/generateCommentarySection.js index c5090660..ed871b47 100644 --- a/src/content/dependencies/generateCommentarySection.js +++ b/src/content/dependencies/generateCommentarySection.js @@ -27,13 +27,22 @@ export default { : !!entries[0].date), }), - generate: (data, relations, {html, language}) => + slots: { + title: {type: 'html', mutable: false}, + id: {type: 'string', default: 'artist-commentary'}, + }, + + generate: (data, relations, slots, {html, language}) => html.tags([ relations.heading .slots({ - title: language.$('misc.artistCommentary'), + title: + (html.isBlank(slots.title) + ? language.$('misc.artistCommentary') + : slots.title), + attributes: [ - {id: 'artist-commentary'}, + {id: slots.id}, data.firstEntryIsDated && {class: 'first-entry-is-dated'}, ], |