diff --git a/docusaurus.config.js b/docusaurus.config.js index 5a66c4a43..914fa8fb4 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -385,4 +385,4 @@ function convertIndent4ToIndent2(code) { return code.replace(/^( {4})+/gm, (match) => { return " ".repeat(match.length / 4); }); -} +} \ No newline at end of file diff --git a/src/pages/404.js b/src/pages/404.js new file mode 100644 index 000000000..1361590bd --- /dev/null +++ b/src/pages/404.js @@ -0,0 +1,12 @@ +import { useEffect } from "react"; +import { useHistory } from "@docusaurus/router"; + +export default function Custom404() { + const history = useHistory(); + + useEffect(() => { + history.replace("/docs"); + }, [history]); + + return null; +}