Skip to content

Commit

Permalink
Merge pull request #14 from myselfshivams/master
Browse files Browse the repository at this point in the history
Added:: Custom 404 Page and added meta tags, robots.txt, sitemap for SEO enhancement
  • Loading branch information
Soumojitshome2023 authored Oct 6, 2024
2 parents 6bd8c8e + 3328d8c commit 5786da4
Show file tree
Hide file tree
Showing 7 changed files with 50 additions and 5 deletions.
8 changes: 8 additions & 0 deletions client/next-sitemap.config.js
Original file line number Diff line number Diff line change
@@ -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,
};
9 changes: 7 additions & 2 deletions client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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"
}
}
9 changes: 9 additions & 0 deletions client/public/robots.txt
Original file line number Diff line number Diff line change
@@ -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
4 changes: 4 additions & 0 deletions client/public/sitemap-0.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:news="http://www.google.com/schemas/sitemap-news/0.9" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:mobile="http://www.google.com/schemas/sitemap-mobile/1.0" xmlns:image="http://www.google.com/schemas/sitemap-image/1.1" xmlns:video="http://www.google.com/schemas/sitemap-video/1.1">
<url><loc>https://soumojit-nextjs-videocall-webapp.vercel.app</loc><lastmod>2024-10-06T05:14:13.004Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
</urlset>
4 changes: 4 additions & 0 deletions client/public/sitemap.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<sitemap><loc>https://soumojit-nextjs-videocall-webapp.vercel.app/sitemap-0.xml</loc></sitemap>
</sitemapindex>
19 changes: 17 additions & 2 deletions client/src/app/layout.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
<html lang="en">
<head>
<title>{metadata.title}</title>
<meta name="description" content={metadata.description} />
<meta name="keywords" content="Video calling, WebRTC, Communication app, Video conferencing, Soumojit Shome" />
<meta property="og:title" content="Video Calling WebApp" />
<meta property="og:description" content="A web application for seamless video calls built by Soumojit Shome." />
<meta property="og:image" content="/images/social-share-image.png" />
<meta property="og:url" content={baseUrl} />
<meta property="og:type" content="website" />
<meta name="robots" content="index, follow" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="icon" href="/favicon.ico" />
</head>
<body className={inter.className}>
<MyContextProvider>
{children}
</MyContextProvider>
</body>
</html>
)
);
}
2 changes: 1 addition & 1 deletion client/src/app/not-found.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,4 @@ export default function CustomErrorPage() {
</div>
</div>
);
}
}

0 comments on commit 5786da4

Please sign in to comment.