1 | initial version |
To include a sitemap.xml in Quasar Framework, follow these steps:
const SitemapPlugin = require('sitemap-webpack-plugin').default
const paths = ['/', '/about', '/contact'] // add your website routes here
module.exports = function (ctx) {
return {
// ...
build: {
// ...
plugins: [
new SitemapPlugin('https://your-website-url.com', paths)
]
}
}
}
Note: make sure to include the sitemap.xml file in your server's root directory and add it to the robots.txt file so that search engines can find it easily.