mirror of
https://framagit.org/les/gancio.git
synced 2025-01-31 16:42:22 +01:00
sitemap!
This commit is contained in:
parent
0fe3066bf0
commit
fac1ee0102
2 changed files with 20 additions and 0 deletions
|
@ -51,8 +51,27 @@ module.exports = {
|
|||
// Doc: https://axios.nuxtjs.org/usage
|
||||
'@nuxtjs/axios',
|
||||
'@nuxtjs/auth',
|
||||
'@nuxtjs/sitemap'
|
||||
],
|
||||
|
||||
sitemap: {
|
||||
hostname: config.baseurl,
|
||||
gzip: true,
|
||||
exclude: [
|
||||
'/Admin',
|
||||
'/settings',
|
||||
'/export',
|
||||
'/setup'
|
||||
],
|
||||
routes: async () => {
|
||||
if (config.status === 'READY') {
|
||||
const Event = require('./server/api/models/event')
|
||||
const events = await Event.findAll({where: { is_visible: true }})
|
||||
return events.map(e => `/event/${e.slug}`)
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
serverMiddleware: ['server/routes'],
|
||||
|
||||
/*
|
||||
|
|
|
@ -31,6 +31,7 @@
|
|||
"@mdi/js": "^6.6.96",
|
||||
"@nuxtjs/auth": "^4.9.1",
|
||||
"@nuxtjs/axios": "^5.13.5",
|
||||
"@nuxtjs/sitemap": "^2.4.0",
|
||||
"accept-language": "^3.0.18",
|
||||
"axios": "^0.27.2",
|
||||
"bcryptjs": "^2.4.3",
|
||||
|
|
Loading…
Reference in a new issue