Sitemap
By default, the sitemap includes all articles and pages of the blog. It is generated automatically by the @nuxtjs/sitemap
module.
However, there is two exceptions:
- pages with the
hidden: false
frontmatter are not included in the sitemap - pages with the
draft: false
frontmatter are not included in the sitemap
The sitemap is generated at the URL /sitemap.xml
. You can disable the sitemap by setting the indexable
option to false
in the nuxt.config.ts
file.
site: {
indexable: false,
},
Multilingual blog
If you have a multilingual blog, you should split your urls by language. For instance, if you have a blog in English and French, you should have the following urls:
https://www.example.com/en/
https://www.example.com/fr/
It is important to configure the alternate links for each page to tell the search engines that the page is available in multiple languages and to avoid duplicate content.
You can configure the alternate links in the frontmatter of the markdown file:
---
alternates:
- hreflang: "en"
href: "/en/2024-02-24/post01"
- hreflang: "fr"
href: "/fr/2024-02-24/post01"
---
The hreflang
attribute is the language of the alternative version of this page. The href
attribute is the url of a page with the same content in another language.
You can read more about the hreflang
attribute on the Google documentation.
/
.