From a0b298e4f230954462131fe9b789457fa76feb2c Mon Sep 17 00:00:00 2001 From: Shivam <143623476+myselfshivams@users.noreply.github.com> Date: Sun, 6 Oct 2024 10:29:06 +0530 Subject: [PATCH 1/2] Added:: Custom 404 Page --- client/src/app/not-found.js | 39 +++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 client/src/app/not-found.js diff --git a/client/src/app/not-found.js b/client/src/app/not-found.js new file mode 100644 index 0000000..4f3dc1d --- /dev/null +++ b/client/src/app/not-found.js @@ -0,0 +1,39 @@ +import Link from 'next/link'; + +export default function Custom404() { + return ( +
+
+
+ + + +
+

404

+

Uh-oh! You're disconnected...

+

+ We couldn't connect to the page you were looking for. +

+ + + +
+

Or check your connection and try again.

+
+
+
+ ); +} From 510b6433c285b82565107cfedc87d6f5825d08f0 Mon Sep 17 00:00:00 2001 From: Shivam <143623476+myselfshivams@users.noreply.github.com> Date: Sun, 6 Oct 2024 10:44:56 +0530 Subject: [PATCH 2/2] added:: Meta Tags, robots.txt, sitemap for SEO Enhancemen --- client/next-sitemap.config.js | 8 ++++++++ client/package.json | 9 +++++++-- client/public/robots.txt | 9 +++++++++ client/public/sitemap-0.xml | 4 ++++ client/public/sitemap.xml | 4 ++++ client/src/app/layout.js | 19 +++++++++++++++++-- 6 files changed, 49 insertions(+), 4 deletions(-) create mode 100644 client/next-sitemap.config.js create mode 100644 client/public/robots.txt create mode 100644 client/public/sitemap-0.xml create mode 100644 client/public/sitemap.xml diff --git a/client/next-sitemap.config.js b/client/next-sitemap.config.js new file mode 100644 index 0000000..b0d7e6d --- /dev/null +++ b/client/next-sitemap.config.js @@ -0,0 +1,8 @@ +const baseUrl = process.env.NEXT_PUBLIC_BASE_URL || 'https://soumojit-nextjs-videocall-webapp.vercel.app/' ; +module.exports = { + siteUrl: baseUrl, + generateRobotsTxt: true, + changefreq: 'daily', + priority: 0.7, + sitemapSize: 5000, +}; \ No newline at end of file diff --git a/client/package.json b/client/package.json index 389f066..0deb92e 100644 --- a/client/package.json +++ b/client/package.json @@ -7,12 +7,15 @@ "build": "next build", "start": "next start", "lint": "next lint", - "custom-server": "node server.js" + "custom-server": "node server.js", + "sitemap": "next-sitemap", + "postbuild": "next-sitemap" }, "dependencies": { "dotenv": "^16.3.1", "flowbite": "^2.2.1", "next": "14.0.3", + "next-sitemap": "^4.2.3", "nextjs-current-url": "^1.0.3", "react": "^18", "react-dom": "^18", @@ -25,9 +28,11 @@ "uuidv4": "^6.2.13" }, "devDependencies": { + "@types/react": "18.3.11", "autoprefixer": "^10.0.1", "dotenv-webpack": "^8.0.1", "postcss": "^8", - "tailwindcss": "^3.3.0" + "tailwindcss": "^3.3.0", + "typescript": "5.6.2" } } diff --git a/client/public/robots.txt b/client/public/robots.txt new file mode 100644 index 0000000..e88c490 --- /dev/null +++ b/client/public/robots.txt @@ -0,0 +1,9 @@ +# * +User-agent: * +Allow: / + +# Host +Host: https://soumojit-nextjs-videocall-webapp.vercel.app/ + +# Sitemaps +Sitemap: https://soumojit-nextjs-videocall-webapp.vercel.app/sitemap.xml diff --git a/client/public/sitemap-0.xml b/client/public/sitemap-0.xml new file mode 100644 index 0000000..1e31506 --- /dev/null +++ b/client/public/sitemap-0.xml @@ -0,0 +1,4 @@ + + +https://soumojit-nextjs-videocall-webapp.vercel.app2024-10-06T05:14:13.004Zdaily0.7 + \ No newline at end of file diff --git a/client/public/sitemap.xml b/client/public/sitemap.xml new file mode 100644 index 0000000..6360f74 --- /dev/null +++ b/client/public/sitemap.xml @@ -0,0 +1,4 @@ + + +https://soumojit-nextjs-videocall-webapp.vercel.app/sitemap-0.xml + \ No newline at end of file diff --git a/client/src/app/layout.js b/client/src/app/layout.js index d4956f1..9439f9b 100644 --- a/client/src/app/layout.js +++ b/client/src/app/layout.js @@ -7,16 +7,31 @@ const inter = Inter({ subsets: ['latin'] }) export const metadata = { title: 'Video Calling WebApp', description: 'Soumojit Shome Video Calling WebApp', -} +}; export default function RootLayout({ children }) { + const baseUrl = process.env.NEXT_PUBLIC_FALLBACK_URL || 'https://soumojit-nextjs-videocall-webapp.vercel.app/'; + return ( + + {metadata.title} + + + + + + + + + + + {children} - ) + ); }