Raw blog finished

This commit is contained in:
2024-02-20 21:15:29 +03:00
parent 44c60f7069
commit eadc0b119d
18 changed files with 356 additions and 200 deletions
+16
View File
@@ -0,0 +1,16 @@
import type { ParsedContent } from '@nuxt/content/dist/runtime/types'
import { formatDate } from 'date-fns'
import { serverQueryContent } from '#content/server'
export default defineSitemapEventHandler(async (e) => {
const contentList = (await serverQueryContent(e).find()) as ParsedContent[]
return contentList.map((c) => {
return asSitemapUrl({
loc: c._path,
lastmod: formatDate(c.updated, 'yyyy-MM-dd'),
changefreq: 'monthly',
priority: 0.9,
})
})
})
+1 -1
View File
@@ -15,7 +15,7 @@
"~/*": ["./*"],
"@/*": ["./*"]
},
"types": ["@nuxt/types", "@nuxtjs/axios", "@nuxt/content", "@types/node"]
"types": ["@nuxt/types", "@nuxtjs/axios", "@nuxt/content", "nuxt-simple-sitemap", "@types/node"]
},
"exclude": ["node_modules", ".nuxt", "dist"]
}