you can edit in nuxt.config.js
module.exports = {
/**
* if you want after run npm generate place dist to subdomain on webhost , you should change base
*/
router: {
base: '/',
},
/*
** Headers of the page
*/
head: {
// this htmlAttrs you need
htmlAttrs: {
lang: 'zh-Hant',
},
title: 'prject',
meta: [
{ 'http-equiv': 'X-UA-Compatible', content: 'IE=edge' },
{ charset: 'utf-8' },
{ name: 'viewport', content: 'width=device-width, initial-scale=1' },
{ hid: 'keyword', name: 'keyword', content: 'yoyo' },
{ hid: 'description', name: 'description', content: 'FINPO project' },
]
.....
you can find more setting on vue-meta
https://github.com/declandewet/vue-meta
@ausir0726 It works like charm. I really should read vue-meta's document first. Thanks !
I came here because of the same "problem". I believe the documentation should include it, maybe here: https://nuxtjs.org/guide/views/#document.
How can I declare lang attribute from $store.state ?
Would also like to know if can declare via $store.state
head(){} method in the pages can be used with $store.state I believe
@mattbag you are right
but if you are in 'spa' mode metatag placed in pages are not been see from search engine
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Most helpful comment
you can edit in nuxt.config.js
you can find more setting on vue-meta
https://github.com/declandewet/vue-meta