From 6d8d88879350c7a84613afa282b69f57be2ecc7c Mon Sep 17 00:00:00 2001 From: snipsnipsnip Date: Thu, 23 Oct 2025 23:31:08 +0900 Subject: [PATCH 1/2] docs: tweak the redirect implementation in webpage I've noticed that we can implement redirection without enabling the `executeScript` option. --- .github/site/index.mjs | 28 ++++++++++++++++++++++++---- 1 file changed, 24 insertions(+), 4 deletions(-) diff --git a/.github/site/index.mjs b/.github/site/index.mjs index fdc8250..855382f 100644 --- a/.github/site/index.mjs +++ b/.github/site/index.mjs @@ -11,14 +11,32 @@ mermaid.initialize({ startOnLoad: false }); * @param {string} path Absolute path (/ points to the repository root) to the resource * @returns {string} The URL to the resource */ -const urlFor = (type, path) => `https://github.com/exteditor/ghostbird/${type}/main/${encodeURIComponent(path.replace(/^[/]+/, ''))}`; +const urlFor = (type, path) => `https://github.com/exteditor/ghostbird/${encodeURIComponent(type)}/main/${encodeURIComponent(path.replace(/^[/]+/, ''))}`; /** * Build a Markdown text that redirects to a URL * @param {string} url The URL to redirect to - * @returns {string} a Markdown text + * @returns {string} A Markdown text */ -const redirectTo = (url) => `Redirecting to ${url}...\n\n