mirror of
https://github.com/ThatGuySam/doesitarm.git
synced 2026-05-18 06:44:46 -07:00
Generate sitemap endpoints from json
This commit is contained in:
parent
11aa303b2e
commit
522a1651c3
2 changed files with 32 additions and 11 deletions
|
|
@ -127,7 +127,18 @@ export default {
|
|||
],
|
||||
|
||||
sitemap: {
|
||||
hostname: 'https://doesitarm.com'
|
||||
hostname: 'https://doesitarm.com',
|
||||
routes: async () => {
|
||||
// Get routes from previous build
|
||||
const sitemapEndpoints = await fs.readFile('./static/sitemap-endpoints.json', 'utf-8')
|
||||
.then( endpointsJson => {
|
||||
return JSON.parse(endpointsJson)
|
||||
})
|
||||
|
||||
console.log('Total Sitemap Endpoints', sitemapEndpoints.length)
|
||||
|
||||
return sitemapEndpoints.map( endpoint => endpoint.route )
|
||||
}
|
||||
},
|
||||
|
||||
buildModules: [
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue