The head option is used to define all default meta tags in the <head> block of our app. You get the following custom head configuration in the Nuxt config file if you use the Nuxt scaffolding tool:
// nuxt.config.js
export default {
head: {
title: process.env.npm_package_name || '',
meta: [
{ charset: 'utf-8' },
{ name: 'viewport', content: 'width=device-width, initial-scale=1' },
{ hid: 'description', name: 'description', content:
process.env.npm_package_description || '' }
],
link: [
{ rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }
]
}
}
You can modify the preceding configuration or add more custom configuration – for example, add some JavaScript and CSS libraries that are required for your project:
// nuxt.config.js
export default {
head: {
titleTemplate...