diff options
author | (quasar) nebula <qznebula@protonmail.com> | 2024-03-01 11:23:07 -0400 |
---|---|---|
committer | (quasar) nebula <qznebula@protonmail.com> | 2024-03-31 19:19:46 -0300 |
commit | 773e06892c78f954a29b1770aaefa963b6596ac0 (patch) | |
tree | 8fd68a382bbb1ad6087b30894d4fa0b4bfcf26ca /src | |
parent | 0c607b69c344e6cd71c2b9a63f3cd0feddca1063 (diff) |
content: transformContent: allow disabling external link cue
Diffstat (limited to 'src')
-rw-r--r-- | src/content/dependencies/generatePageLayout.js | 7 | ||||
-rw-r--r-- | src/content/dependencies/transformContent.js | 20 |
2 files changed, 19 insertions, 8 deletions
diff --git a/src/content/dependencies/generatePageLayout.js b/src/content/dependencies/generatePageLayout.js index 9e9b4615..86a346b6 100644 --- a/src/content/dependencies/generatePageLayout.js +++ b/src/content/dependencies/generatePageLayout.js @@ -289,8 +289,11 @@ export default { let footerContent = slots.footerContent; if (html.isBlank(footerContent) && relations.defaultFooterContent) { - footerContent = relations.defaultFooterContent - .slot('mode', 'multiline'); + footerContent = + relations.defaultFooterContent.slots({ + mode: 'multiline', + indicateExternalLinks: false, + }); } const mainHTML = diff --git a/src/content/dependencies/transformContent.js b/src/content/dependencies/transformContent.js index e64aeb57..d409df8f 100644 --- a/src/content/dependencies/transformContent.js +++ b/src/content/dependencies/transformContent.js @@ -216,6 +216,11 @@ export default { default: false, }, + indicateExternalLinks: { + type: 'boolean', + default: true, + }, + thumb: { validate: v => v.is('small', 'medium', 'large'), default: 'large', @@ -342,12 +347,15 @@ export default { const {label} = node.data; const externalLink = relations.externalLinks[externalLinkIndex++]; - externalLink.setSlots({ - indicateExternal: true, - tab: 'separate', - style: 'platform', - content: label, - }); + externalLink.setSlot('content', label); + + if (slots.indicateExternalLinks) { + externalLink.setSlots({ + indicateExternal: true, + tab: 'separate', + style: 'platform', + }); + } return {type: 'processed-external-link', data: externalLink}; } |