export default {
// Global page headers
head: {
title: 'My Nuxt App',
meta: [
{ charset: 'utf-8' },
{ name: 'viewport', content: 'width=device-width, initial-scale=1' },
{ hid: 'description', name: 'description', content: 'My awesome Nuxt.js project' },
{ name: 'keywords', content: 'vue, nuxt, seo, vuejs, ssr' },
],
link: [
{ rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }
]
},
// Other configurations...
};
}
modules: [
'@nuxtjs/sitemap'
],
sitemap: {
hostname: 'https://my-nuxt-app.com',
routes: async () => {
const posts = await fetch('https://api.example.com/posts').then(res => res.json());
return posts.map(post => `/blog/${post.id}`);
}
}
User-agent: *
Disallow:
Sitemap: https://my-nuxt-app.com/sitemap.xml