Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Auto generate a sitemap #31

Merged
merged 3 commits into from
Feb 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions next-sitemap.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/** @type {import('next-sitemap').IConfig} */
module.exports = {
siteUrl: 'https://www.utdnebula.com/',
generateRobotsTxt: true,
generateIndexSitemap: false,
};
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"scripts": {
"dev": "next dev",
"build": "next build",
"postbuild": "next-sitemap",
"start": "next start",
"lint:check": "next lint",
"lint": "next lint --fix",
Expand All @@ -15,6 +16,7 @@
"@headlessui/react": "^1.7.17",
"clsx": "^2.0.0",
"next": "^13.4.19",
"next-sitemap": "^4.2.3",
"nextra": "^2.12.3",
"nextra-theme-docs": "^2.12.3",
"react": "^18.2.0",
Expand Down
39 changes: 21 additions & 18 deletions 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://www.utdnebula.com/

# Sitemaps
Sitemap: https://www.utdnebula.com/sitemap.xml
7 changes: 7 additions & 0 deletions public/sitemap.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?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://www.utdnebula.com</loc><lastmod>2024-01-31T04:17:32.986Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://www.utdnebula.com/about</loc><lastmod>2024-01-31T04:17:32.986Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://www.utdnebula.com/about/governance</loc><lastmod>2024-01-31T04:17:32.986Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://www.utdnebula.com/about/roles</loc><lastmod>2024-01-31T04:17:32.986Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
</urlset>
2 changes: 1 addition & 1 deletion src/components/Footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ const Footer = (props: FooterProps) => {
<StyledNextLink href="/">Terms of Service</StyledNextLink>
<StyledNextLink href="/">Privacy Policy</StyledNextLink>
<StyledNextLink href="/">Security</StyledNextLink>
<StyledNextLink href="/">Sitemap</StyledNextLink>
<StyledNextLink href="/sitemap.xml">Sitemap</StyledNextLink>
</div>
<div className="md:text-right text-center text-xs">
<p>© 2023 Nebula Labs Maintainers. All rights reserved.</p>
Expand Down
Loading