Skip to content

Commit

Permalink
feat(client): add sitemap generation to next app
Browse files Browse the repository at this point in the history
  • Loading branch information
AmruthPillai committed Mar 12, 2022
1 parent 30d0151 commit 2cbc582
Show file tree
Hide file tree
Showing 6 changed files with 56 additions and 2 deletions.
6 changes: 6 additions & 0 deletions client/next-sitemap.config.js
@@ -0,0 +1,6 @@
/** @type {import('next-sitemap').IConfig} */
module.exports = {
siteUrl: 'https://rxresu.me',
changefreq: 'monthly',
generateRobotsTxt: true,
};
6 changes: 4 additions & 2 deletions client/package.json
Expand Up @@ -2,9 +2,10 @@
"name": "@reactive-resume/client",
"scripts": {
"dev": "react-env --prefix PUBLIC -- next dev",
"build": "next build",
"build": "next build && npm run sitemap",
"start": "react-env --prefix PUBLIC -- next start",
"lint": "next lint --fix"
"lint": "next lint --fix",
"sitemap": "next-sitemap --config next-sitemap.config.js"
},
"dependencies": {
"@beam-australia/react-env": "^3.1.1",
Expand Down Expand Up @@ -67,6 +68,7 @@
"autoprefixer": "^10.4.2",
"eslint": "^8.10.0",
"eslint-config-next": "12.1.0",
"next-sitemap": "^2.5.7",
"postcss": "^8.4.8",
"prettier": "^2.5.1",
"sass": "^1.49.9",
Expand Down
9 changes: 9 additions & 0 deletions client/public/robots.txt
@@ -0,0 +1,9 @@
# *
User-agent: *
Allow: /

# Host
Host: https://rxresu.me

# Sitemaps
Sitemap: https://rxresu.me/sitemap.xml
15 changes: 15 additions & 0 deletions client/public/sitemap-0.xml
@@ -0,0 +1,15 @@
<?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://rxresu.me</loc><changefreq>monthly</changefreq><priority>0.7</priority><lastmod>2022-03-12T10:44:13.581Z</lastmod></url>
<url><loc>https://rxresu.me/dashboard</loc><changefreq>monthly</changefreq><priority>0.7</priority><lastmod>2022-03-12T10:44:13.581Z</lastmod></url>
<url><loc>https://rxresu.me/meta/privacy</loc><changefreq>monthly</changefreq><priority>0.7</priority><lastmod>2022-03-12T10:44:13.581Z</lastmod></url>
<url><loc>https://rxresu.me/meta/service</loc><changefreq>monthly</changefreq><priority>0.7</priority><lastmod>2022-03-12T10:44:13.581Z</lastmod></url>
<url><loc>https://rxresu.me/de/dashboard</loc><changefreq>monthly</changefreq><priority>0.7</priority><lastmod>2022-03-12T10:44:13.581Z</lastmod></url>
<url><loc>https://rxresu.me/kn/dashboard</loc><changefreq>monthly</changefreq><priority>0.7</priority><lastmod>2022-03-12T10:44:13.581Z</lastmod></url>
<url><loc>https://rxresu.me/ta/dashboard</loc><changefreq>monthly</changefreq><priority>0.7</priority><lastmod>2022-03-12T10:44:13.581Z</lastmod></url>
<url><loc>https://rxresu.me/hi/dashboard</loc><changefreq>monthly</changefreq><priority>0.7</priority><lastmod>2022-03-12T10:44:13.581Z</lastmod></url>
<url><loc>https://rxresu.me/de</loc><changefreq>monthly</changefreq><priority>0.7</priority><lastmod>2022-03-12T10:44:13.581Z</lastmod></url>
<url><loc>https://rxresu.me/kn</loc><changefreq>monthly</changefreq><priority>0.7</priority><lastmod>2022-03-12T10:44:13.581Z</lastmod></url>
<url><loc>https://rxresu.me/ta</loc><changefreq>monthly</changefreq><priority>0.7</priority><lastmod>2022-03-12T10:44:13.581Z</lastmod></url>
<url><loc>https://rxresu.me/hi</loc><changefreq>monthly</changefreq><priority>0.7</priority><lastmod>2022-03-12T10:44:13.581Z</lastmod></url>
</urlset>
4 changes: 4 additions & 0 deletions client/public/sitemap.xml
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<sitemap><loc>https://rxresu.me/sitemap-0.xml</loc></sitemap>
</sitemapindex>
18 changes: 18 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 2cbc582

Please sign in to comment.