diff options
| author | mihna123 <mihailonvojinovic@gmail.com> | 2026-06-09 00:17:55 +0200 |
|---|---|---|
| committer | mihna123 <mihailonvojinovic@gmail.com> | 2026-06-09 00:17:55 +0200 |
| commit | edb268a115220d329f912c507ceeb13c2ca5ab8a (patch) | |
| tree | fcca509b44079f1e24342472814fe36f881a2e38 /src/app | |
| parent | 1a487b742882569e1fcf4f1dddf7687db38c81d1 (diff) | |
| download | invoice-edb268a115220d329f912c507ceeb13c2ca5ab8a.tar.gz invoice-edb268a115220d329f912c507ceeb13c2ca5ab8a.zip | |
feat: add a sitemap
Diffstat (limited to 'src/app')
| -rw-r--r-- | src/app/sitemap.ts | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/src/app/sitemap.ts b/src/app/sitemap.ts new file mode 100644 index 0000000..8b23ae9 --- /dev/null +++ b/src/app/sitemap.ts @@ -0,0 +1,34 @@ +import { getAllBlogs } from '@/lib/blogs/api'; +import type { MetadataRoute } from 'next'; + +export default function sitemap(): MetadataRoute.Sitemap { + const blogs = getAllBlogs(); + const blogUrls = blogs.map((blog) => ({ + url: `https://free-incoices.org/blogs/${blog.slug}`, + lastModified: new Date(), + changeFrequency: 'yearly' as const, + priority: 0.8, + })); + + return [ + { + url: 'https://free-invoices.org', + lastModified: new Date(), + changeFrequency: 'weekly', + priority: 1, + }, + { + url: 'https://free-invoices.org/help', + lastModified: new Date(), + changeFrequency: 'monthly', + priority: 0.6, + }, + { + url: 'https://free-invoices.org/blogs', + lastModified: new Date(), + changeFrequency: 'monthly', + priority: 0.7, + }, + ...blogUrls, + ]; +} |
