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.
1 parent a17e244 commit f6762c3Copy full SHA for f6762c3
app/sitemap.ts
@@ -4,10 +4,12 @@ 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) => ({
+ url: `${siteUrl}/${post.path}`,
11
+ lastModified: post.lastmod || post.date,
12
+ }))
13
14
const routes = ['', 'blog', 'projects', 'tags'].map((route) => ({
15
url: `${siteUrl}/${route}`,
0 commit comments