From 1a0e64d51be288aeb737256d175005d38713b977 Mon Sep 17 00:00:00 2001 From: Robert Best Date: Fri, 21 Feb 2025 11:36:00 -0500 Subject: [PATCH] fix pageURL logic to not put double slash before slugs in some cases Currently, if a page in an activity item's rendered body is only on a remote site, then it's href gets a double slash before the slug. This doesn't break how wiki works for some reason (if you just click the link normally), but it does break the ability to open any of those links in a new tab. I have tested this fix locally, and it seems to work in all cases. This is how hovering over links looked before: --- src/client/activity.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/client/activity.js b/src/client/activity.js index ddacdd4..475a14c 100644 --- a/src/client/activity.js +++ b/src/client/activity.js @@ -239,7 +239,7 @@ const bind = ($item, item) => { const pageURL = (sites.length === 1 && sites[0].site !== location.host) || !sites.some(i => i.site === location.host) - ? wiki.site(sites[0].site).getURL(`/${sites[0].page.slug}.html`) + ? wiki.site(sites[0].site).getURL(`${sites[0].page.slug}.html`) : `/${sites[0].page.slug}.html` const pageLink = h(