vue-router-sitemap
vue-router-sitemap copied to clipboard
Uncaught TypeError: app.get is not a function
hi, whats this error?
app.get('/sitemap.xml', sitemapMiddleware());
I have the same issue.
Hi, I'm having the same issue, did you guys get this working?
Hello here, something new on this issue?
Seems that this project is already abandoned? I have no idea about how to use it.
Hi, You can use vue router middleware in the case of app.get('sitemap'). Let's say you have a router link like so.. `{ path: '/', name: 'index', component: Index, }
// You can add a new meta field with middleware so it would be { path: '/', name: 'index', component: Index, meta: { middleware: sitemapMiddleware // This is a file in middleware folder in your src directory. As documented in this libs docs },
,
Since you have generated a new sitemap.xml in your public directory. i.e so that it can be accessed anywhere like your favicon.ico The sitemap.xml can be accessed using e.g localhost:8080/sitemap.xml. I hope this makes sense...
`