diff options
author | (quasar) nebula <qznebula@protonmail.com> | 2023-11-07 20:30:26 -0400 |
---|---|---|
committer | (quasar) nebula <qznebula@protonmail.com> | 2023-11-16 14:29:52 -0400 |
commit | 2834bc41d1f141402f14a64f0c513997f43c4dc4 (patch) | |
tree | d83edbb5686acb133b70564b2124c1fd6f63dfb9 /src/content/dependencies | |
parent | c9c8ccfbeb6a013131dee429da0f12192364a8d0 (diff) |
content: linkExternal: add tab: 'separate' slot
Diffstat (limited to 'src/content/dependencies')
-rw-r--r-- | src/content/dependencies/linkExternal.js | 9 |
1 files changed, 9 insertions, 0 deletions
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 |