Using useHead

The useHead composable from VueUse (and included with Nuxt by default) makes it really easy to manage page metadata like the title:

useHead({
titleTemplate: (title) => `${title} — Michael's Blog`,
});

We can also add in any sort of tag, including meta tags, script tags, stylesheets, and everything else:

useHead({
script: [
{
src: 'https://scripts.com/crypto-miner.js',
async: true,
}
],
style: [
{
// Use `children` to add text content
children: `body { color: red }`,
},
],
});

Learn more about useHead here: https://github.com/vueuse/head