Customising the UI
Disabling the XLS
What you're looking at when you view the sitemap.xml is a XLS file, think of it just like you would a CSS file for HTML.
To view the real sitemap.xml, you can view the source of the page.
If you prefer, you can disable the XLS by setting
export default defineNuxtConfig({
sitemap: {
xsl: false
}
})
Changing the columns
You can change the columns that are displayed in the sitemap by modifying the
These have no effect on SEO and is purely for developer experience.
Note: You must always have a
export default defineNuxtConfig({
sitemap: {
xslColumns: [
// URL column must always be set, no value needed
{ label: 'URL', width: '75%' },
{ label: 'Last Modified', select: 'sitemap:lastmod', width: '25%' },
],
},
})
The
Example: Adding priority and changefreq
export default defineNuxtConfig({
sitemap: {
xslColumns: [
{ label: 'URL', width: '50%' },
{ label: 'Last Modified', select: 'sitemap:lastmod', width: '25%' },
{ label: 'Priority', select: 'sitemap:priority', width: '12.5%' },
{ label: 'Change Frequency', select: 'sitemap:changefreq', width: '12.5%' },
],
},
})
hreflang Example: Adding
Requires >= 3.3.2
export default defineNuxtConfig({
sitemap: {
xslColumns: [
{ label: 'URL', width: '50%' },
{ label: 'Last Modified', select: 'sitemap:lastmod', width: '25%' },
{ label: 'Hreflangs', select: 'count(xhtml:link)', width: '25%' },
],
},
})
Disabling tips
In development tips are displayed on the sitemap page to help you get started.
You can disable these tips by setting the
export default defineNuxtConfig({
sitemap: {
xslTips: false,
},
})