We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents a17e244 + fa262d0 commit e4b6438Copy full SHA for e4b6438
app/sitemap.ts
@@ -4,10 +4,13 @@ import siteMetadata from '@/data/siteMetadata'
4
5
export default function sitemap(): MetadataRoute.Sitemap {
6
const siteUrl = siteMetadata.siteUrl
7
- const blogRoutes = allBlogs.map((post) => ({
8
- url: `${siteUrl}/${post.path}`,
9
- lastModified: post.lastmod || post.date,
10
- }))
+
+ const blogRoutes = allBlogs
+ .filter((post) => !post.draft)
+ .map((post) => ({
11
+ url: `${siteUrl}/${post.path}`,
12
+ lastModified: post.lastmod || post.date,
13
+ }))
14
15
const routes = ['', 'blog', 'projects', 'tags'].map((route) => ({
16
url: `${siteUrl}/${route}`,
0 commit comments