Skip to content

Commit 93410de

Browse files
committed
Compelte making sitemaps
1 parent d83300d commit 93410de

File tree

11 files changed

+37
-12
lines changed

11 files changed

+37
-12
lines changed

.env.development

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
BASE_URL=http://localhost:3000

.env.production

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
BASE_URL=https://the-infinitys.f5.si

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ yarn-error.log*
3131
.pnpm-debug.log*
3232

3333
# env files (can opt-in for committing if needed)
34-
.env*
34+
# .env*
3535

3636
# vercel
3737
.vercel

next-sitemap.config.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
/** @type {import('next-sitemap').IConfig} */
2+
module.exports = {
3+
siteUrl: process.env.BASE_URL || "https://the-infinitys.f5.si",
4+
generateRobotsTxt: true,
5+
sitemapSize: 7000,
6+
outDir: "./out",
7+
output: "export",
8+
};

next.config.ts

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import type { NextConfig } from "next";
2-
// import createNextIntlPlugin from "next-intl/plugin";
2+
import createNextIntlPlugin from "next-intl/plugin";
33

4-
// const withNextIntl = createNextIntlPlugin();
4+
const withNextIntl = createNextIntlPlugin();
55

66
/** @type {import('next').NextConfig} */
77
const nextConfig: NextConfig = {
@@ -10,10 +10,5 @@ const nextConfig: NextConfig = {
1010
images: { unoptimized: true },
1111
trailingSlash: true,
1212
};
13-
/** @type {import("next-sitemap").IConfig} */
14-
module.exports = {
15-
siteUrl: process.env.SITE_URL || "https://the-infinitys.f5.si",
16-
generateRobotsTxt:true,
17-
}
1813

19-
export default nextConfig;
14+
export default withNextIntl(nextConfig);

package-lock.json

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"scripts": {
66
"dev": "next dev --turbopack",
77
"build": "next build",
8-
"postbuild":"next-sitemap",
8+
"postbuild": "next-sitemap --config next-sitemap.config.js",
99
"start": "next start",
1010
"lint": "next lint"
1111
},

public/robots.txt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# *
2+
User-agent: *
3+
Allow: /
4+
5+
# Host
6+
Host: https://the-infinitys.f5.si
7+
8+
# Sitemaps
9+
Sitemap: https://the-infinitys.f5.si/sitemap.xml

public/sitemap-0.xml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<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">
3+
<url><loc>https://the-infinitys.f5.si/</loc><lastmod>2025-05-07T06:48:33.998Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
4+
<url><loc>https://the-infinitys.f5.si/article-2025/04/grok3/</loc><lastmod>2025-05-07T06:48:33.999Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
5+
<url><loc>https://the-infinitys.f5.si/article-2025/04/renewed-with-nextjs/</loc><lastmod>2025-05-07T06:48:33.999Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
6+
<url><loc>https://the-infinitys.f5.si/article-2025/05/may-introduction/</loc><lastmod>2025-05-07T06:48:33.999Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
7+
<url><loc>https://the-infinitys.f5.si/article/</loc><lastmod>2025-05-07T06:48:33.999Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
8+
</urlset>

public/sitemap.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
3+
<sitemap><loc>https://the-infinitys.f5.si/sitemap-0.xml</loc></sitemap>
4+
</sitemapindex>

0 commit comments

Comments
 (0)