Skip to content

Commit

Permalink
Merge branch 'main' into depfu/batch_all/npm/2024-07-13
Browse files Browse the repository at this point in the history
  • Loading branch information
Skolaczk authored Jul 14, 2024
2 parents 14f8e18 + b94d632 commit 6a541bd
Show file tree
Hide file tree
Showing 6 changed files with 35 additions and 51 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@
- 🐶 Husky & Lint Staged - Run scripts on your staged files before they are committed
- 🔹 Icons - From Lucide
- 🌑 Dark mode - With next-themes
- 🗺️ Sitemap & robots.txt - With next-sitemap
- 📝 Commitlint - Lint your git commits
- 🤖 Github actions - Lint your code on PR
- ⚙️ T3-env - Manage your environment variables
- 🗺️ Sitemap & robots.txt
- 💯 Perfect Lighthouse score
- 🌐 I18n with Paraglide

Expand Down
7 changes: 0 additions & 7 deletions next-sitemap.config.js

This file was deleted.

43 changes: 2 additions & 41 deletions package-lock.json

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

2 changes: 0 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
"test:watch": "jest --watchAll",
"e2e": "playwright test",
"e2e:ui": "playwright test --ui",
"postbuild": "next-sitemap --config next-sitemap.config.js",
"prepare": "husky",
"postinstall": "paraglide-js compile --project ./project.inlang --outdir ./src/paraglide"
},
Expand Down Expand Up @@ -79,7 +78,6 @@
"jest": "^29.7.0",
"jest-environment-jsdom": "^29.7.0",
"lint-staged": "^15.2.7",
"next-sitemap": "^4.2.3",
"postcss": "^8",
"prettier": "^3.3.2",
"prisma": "^5.16.2",
Expand Down
13 changes: 13 additions & 0 deletions src/app/robots.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { MetadataRoute } from 'next';

import { env } from '@/env.mjs';

export default function robots(): MetadataRoute.Robots {
return {
rules: {
userAgent: '*',
allow: '/',
},
sitemap: `${env.APP_URL}/sitemap.xml`,
};
}
19 changes: 19 additions & 0 deletions src/app/sitemap.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import { MetadataRoute } from 'next';

import { env } from '@/env.mjs';

export default function sitemap(): MetadataRoute.Sitemap {
return [
{
url: env.APP_URL || '/',
lastModified: new Date(),
changeFrequency: 'yearly',
priority: 1,
alternates: {
languages: {
pl: `${env.APP_URL}/pl`,
},
},
},
];
}

0 comments on commit 6a541bd

Please sign in to comment.