From 05b7dc2f86b7b4e89b07cc54f53e851fe11e0e1a Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Tue, 6 Jun 2023 20:15:56 -0300 Subject: content: linkThing: anchor flag This disables passing the path to the linked thing and blanks the href, so that only the hash is passed through. --- src/content/dependencies/linkThing.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/content/dependencies/linkThing.js b/src/content/dependencies/linkThing.js index 1e648ee6..4ccdf58d 100644 --- a/src/content/dependencies/linkThing.js +++ b/src/content/dependencies/linkThing.js @@ -45,6 +45,8 @@ export default { default: true, }, + anchor: {type: 'boolean', default: false}, + attributes: relations.linkTemplate.getSlotDescription('attributes'), hash: relations.linkTemplate.getSlotDescription('hash'), }, @@ -77,7 +79,8 @@ export default { return relations.linkTemplate .slots({ - path, + path: slots.anchor ? [] : path, + href: slots.anchor ? '' : null, content, color, tooltip, -- cgit 1.3.0-6-gf8a5