From cb730c10da82a736993c0e75ab62c0a81c5316ce Mon Sep 17 00:00:00 2001 From: moexiami Date: Tue, 31 Dec 2024 20:11:03 +0800 Subject: [PATCH] fix(path): correct socialUrl rendering Currently, socialUrl is incorrectly rendered as https:/baseUrl/path, with a missing slash in ://. Since socialUrl is only used when cfg.baseUrl is defined, we can simplify by using cfg.baseUrl directly, excluding the scheme portion of the URL. --- quartz/components/Head.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/quartz/components/Head.tsx b/quartz/components/Head.tsx index a8e4974d1..bfca70fdb 100644 --- a/quartz/components/Head.tsx +++ b/quartz/components/Head.tsx @@ -152,7 +152,9 @@ export default (() => { // Url of current page const socialUrl = - fileData.slug === "404" ? url.toString() : joinSegments(url.toString(), fileData.slug!) + fileData.slug === "404" + ? url.toString() + : `https://${joinSegments(cfg.baseUrl, fileData.slug!)}` return (