diff --git a/plugins/docusaurus-tailwindcss-loader/package.json b/plugins/docusaurus-tailwindcss-loader/package.json new file mode 100644 index 000000000..2fd441413 --- /dev/null +++ b/plugins/docusaurus-tailwindcss-loader/package.json @@ -0,0 +1,11 @@ +{ + "name": "docusaurus-tailwindcss-loader", + "version": "1.0.0", + "description": "A Docusaurus plugin to load TailwindCSS", + "main": "index.js", + "peerDependencies": { + "postcss-import": "^14.0.2", + "tailwindcss": "^3.0.1", + "postcss-preset-env": "^7.4.1" + } +} diff --git a/src/theme/NotFound/Content/index.js b/src/theme/NotFound/Content/index.js index a20b1a706..20dc65501 100644 --- a/src/theme/NotFound/Content/index.js +++ b/src/theme/NotFound/Content/index.js @@ -1,22 +1,27 @@ import React, {useEffect} from "react"; import {PageMetadata} from "@docusaurus/theme-common"; -export default function Index() { +export default function NotFound() { useEffect(() => { - window.location.href = "/docs/"; - }, 2000); - []; + // Immediate redirect after 1s without showing any error + if (typeof window !== "undefined") { + const id = setTimeout(() => { + window.location.href = "/docs/"; + }, 1000); + return () => clearTimeout(id); + } + return undefined; + }, []); return ( <> -
-
-
-

Redirecting to home page...

-
-
-
+
); }