website: Docusaurus 3.9.2 (#18506)

This commit is contained in:
Teffen Ellis
2025-12-02 20:17:52 +01:00
committed by GitHub
parent 324a6de47c
commit 1474c65e11
17 changed files with 1258 additions and 1404 deletions

View File

@@ -49,12 +49,12 @@ const RedirectFound: React.FC<RedirectFoundProps> = ({ nextURL, className }) =>
const usingRouter = nextURL.startsWith("/");
useEffect(() => {
console.log("Redirecting...", { nextURL, usingRouter });
console.debug("Redirecting...", { nextURL, usingRouter });
if (usingRouter) return;
window.location.assign(nextURL);
}, []);
}, [nextURL, usingRouter]);
return (
<main
@@ -112,15 +112,16 @@ const NotFoundContentRouter: React.FC<Props> = (props) => {
// Is there somewhere to redirect to that isn't the current pathname?
if (!destination || destination === pathname) {
console.log("No redirect found", { pathname, suffix, destination });
console.debug("No redirect found", { pathname, suffix, destination });
return <NotFound {...props} />;
}
const nextURL = destination + suffix;
console.log("Redirect found", { pathname, suffix, destination, nextURL });
console.debug("Redirect found", { pathname, suffix, destination, nextURL });
// eslint-disable-next-line react-hooks/immutability
document.documentElement.dataset.redirect = "pending";
return <RedirectFound nextURL={nextURL} {...props} />;