From 2834bc41d1f141402f14a64f0c513997f43c4dc4 Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Tue, 7 Nov 2023 20:30:26 -0400 Subject: content: linkExternal: add tab: 'separate' slot --- src/content/dependencies/linkExternal.js | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src') diff --git a/src/content/dependencies/linkExternal.js b/src/content/dependencies/linkExternal.js index 5de612e2..4a0959c0 100644 --- a/src/content/dependencies/linkExternal.js +++ b/src/content/dependencies/linkExternal.js @@ -24,6 +24,11 @@ export default { validate: v => v.is('generic', 'album', 'flash'), default: 'generic', }, + + tab: { + validate: v => v.is('default', 'separate'), + default: 'default', + }, }, generate(data, slots, {html, language}) { @@ -53,6 +58,10 @@ export default { { href: data.url, class: 'nowrap', + target: + (slots.tab === 'separate' + ? '_blank' + : null), }, // truly unhinged indentation here -- cgit 1.3.0-6-gf8a5