diff --git a/next.config.js b/next.config.js index 320f052..dc3e2b7 100644 --- a/next.config.js +++ b/next.config.js @@ -2,6 +2,7 @@ const nextConfig = { reactStrictMode: true, output: "export", + basePath: "/markdown-text-editor", }; module.exports = nextConfig; diff --git a/package-lock.json b/package-lock.json index 1be9d07..0b12f93 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8,6 +8,7 @@ "name": "markdown-text-editor", "version": "0.1.0", "dependencies": { + "@next/third-parties": "^14.1.0", "bootstrap": "^5.3.2", "bootstrap-icons": "^1.11.3", "dompurify": "^3.0.8", @@ -301,6 +302,18 @@ "node": ">= 10" } }, + "node_modules/@next/third-parties": { + "version": "14.1.0", + "resolved": "https://registry.npmjs.org/@next/third-parties/-/third-parties-14.1.0.tgz", + "integrity": "sha512-f55SdvQ1WWxi4mb5QqtYQh5wRzbm1XaeP7s39DPn4ks3re+n9VlFccbMxBRHqkE62zAyIKmvkUB2cByT/gugGA==", + "dependencies": { + "third-party-capital": "1.0.20" + }, + "peerDependencies": { + "next": "^13.0.0 || ^14.0.0", + "react": "^18.2.0" + } + }, "node_modules/@nodelib/fs.scandir": { "version": "2.1.5", "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", @@ -5180,6 +5193,11 @@ "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", "dev": true }, + "node_modules/third-party-capital": { + "version": "1.0.20", + "resolved": "https://registry.npmjs.org/third-party-capital/-/third-party-capital-1.0.20.tgz", + "integrity": "sha512-oB7yIimd8SuGptespDAZnNkzIz+NWaJCu2RMsbs4Wmp9zSDUM8Nhi3s2OOcqYuv3mN4hitXc8DVx+LyUmbUDiA==" + }, "node_modules/to-regex-range": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", diff --git a/package.json b/package.json index eb882b5..3da6480 100644 --- a/package.json +++ b/package.json @@ -9,6 +9,7 @@ "lint": "next lint" }, "dependencies": { + "@next/third-parties": "^14.1.0", "bootstrap": "^5.3.2", "bootstrap-icons": "^1.11.3", "dompurify": "^3.0.8", diff --git a/src/components/Page/index.tsx b/src/components/Page/index.tsx index 155380d..934ffe0 100644 --- a/src/components/Page/index.tsx +++ b/src/components/Page/index.tsx @@ -18,7 +18,7 @@ export default function Page({ pageData }: { pageData: PageData }) { - + {head.title} diff --git a/src/layout/index.tsx b/src/layout/index.tsx index 7886f17..3951697 100644 --- a/src/layout/index.tsx +++ b/src/layout/index.tsx @@ -1,9 +1,9 @@ import Navbar from "./Navbar"; import Footer from "./Footer"; -import { useEffect } from "react"; +import { ReactNode, useEffect } from "react"; import { useDarkMode } from "@/context/useDarkMode"; -export default function Layout({ children }: { children: JSX.Element }) { +export default function Layout({ children }: { children: ReactNode }) { const { isDarkMode } = useDarkMode(); // fetch light/dark mode css for code highlighting in vsc style diff --git a/src/pages/_app.tsx b/src/pages/_app.tsx index a1c3dbe..36915c3 100644 --- a/src/pages/_app.tsx +++ b/src/pages/_app.tsx @@ -4,6 +4,7 @@ import type { AppProps } from "next/app"; import Layout from "../layout"; import { DarkModeProvider } from "@/context/useDarkMode"; import { MarkdownEditorProvider } from "@/context/useMarkdownEditor"; +import { GoogleAnalytics } from "@next/third-parties/google"; export default function App({ Component, pageProps }: AppProps) { return ( @@ -11,6 +12,7 @@ export default function App({ Component, pageProps }: AppProps) { +