I noticed that meta tags in a page component don't automatically overwrite (or, more specifically, replace) meta tags in the nuxt.config.js.
For example: nuxt.config.js
:
...head: {
title: 'starter',
meta: [
{ charset: 'utf-8' },
{ name: 'viewport', content: 'width=device-width, initial-scale=1' },
{ name: 'keywords', content: 'keyword 1, keyword 2'},
{name: 'description', content: 'This is the generic description.'}
],
},
...
However, if I also have a description
meta in my individual page:
export default {
head () {
return {
title: `Page 1 (${this.name}-side)`,
meta: [
{ name: 'description', content: "Page 1 description" }
],
}
}
}
I notice that two meta tags with description are generated. I assume this is by design. But is there a way to have a default description replaced -- overwritten -- by a page-level description?
I ask because I'm trying to essentially replace Jekyll with Nuxt -- via nuxt generate
-- and then have a json file generated (via Cheerio parsing the generated pages) with all the meta tags that, in turn, can be fetched back into the home page to display the recent posts (including, as I indicate above, the meta descriptions for each page.)