How to set NuxtJS title % meta tags from nuxt-middleware/nuxt-plugin?
currently i'm setting it from nuxt.config.js like below.
head: () => {
const now = Date.now()
return {
title: `config test : ${now}`,
meta: [
{
hid: 'description',
name: 'description',
content: 'My custom description'
}
]
}
},
Please note that i know i can set similarly in the page component. I don't wanna set the header function in every page instead i want a common place where i can set the header dynamically with using the router instance. which is in router middle-ware or plugin.