Skip to content

Commit

Permalink
feat: generated sitemap
Browse files Browse the repository at this point in the history
  • Loading branch information
crystalcheong committed Apr 1, 2023
1 parent e4a4440 commit 75c808d
Show file tree
Hide file tree
Showing 12 changed files with 1,849 additions and 2,559 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# weight reduction
package-lock.json

# dependencies
/node_modules
/.pnp
Expand Down
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
auto-install-peers=true
enable-pre-post-scripts=true
7 changes: 7 additions & 0 deletions next-sitemap.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/** @type {import('next-sitemap').IConfig} */
module.exports = {
siteUrl:
`https://${process.env.VERCEL_URL}` ||
`http://localhost:${process.env.PORT ?? 3000}`,
generateRobotsTxt: true,
};
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
"private": true,
"scripts": {
"dev": "next dev",
"build": "next build",
"build": "next build && pnpm build:sitemap",
"build:sitemap": "next-sitemap",
"start": "next start",
"preview": "next build && next start",
"lint": "next lint",
Expand Down Expand Up @@ -52,6 +53,7 @@
"next": "^13.2.4",
"next-auth": "^4.20.1",
"next-pwa": "^5.6.0",
"next-sitemap": "^4.0.6",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-icons": "^4.8.0",
Expand Down
27 changes: 26 additions & 1 deletion pnpm-lock.yaml

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

9 changes: 9 additions & 0 deletions public/robots.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# *
User-agent: *
Allow: /

# Host
Host: https://homey-sg.vercel.app

# Sitemaps
Sitemap: https://homey-sg.vercel.app/sitemap.xml
9 changes: 9 additions & 0 deletions public/sitemap.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?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://homey-sg.vercel.app</loc><lastmod>2023-04-01T14:41:57.669Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://homey-sg.vercel.app/account/posted</loc><lastmod>2023-04-01T14:41:57.669Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://homey-sg.vercel.app/account/saved</loc><lastmod>2023-04-01T14:41:57.669Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://homey-sg.vercel.app/account/update</loc><lastmod>2023-04-01T14:41:57.669Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://homey-sg.vercel.app/explore/neighbourhoods</loc><lastmod>2023-04-01T14:41:57.669Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://homey-sg.vercel.app/explore/new-launches</loc><lastmod>2023-04-01T14:41:57.669Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
</urlset>
Loading

1 comment on commit 75c808d

@vercel
Copy link

@vercel vercel bot commented on 75c808d Apr 1, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

homey – ./

homey-git-main-crystalcheong.vercel.app
homey-sg.vercel.app
homey-crystalcheong.vercel.app

Please sign in to comment.