在每个页面上动态更新核心元数据(SEO优化)
发布时间
阅读量:
阅读量
近期在实际操作中遇到需要应用Seo的场景,对每个页面提出了title、keywords以及description需各不相同的要求。
!!!在此基础上,建议首先增加以下步骤:
在html文件中进行相应内容的添加
<meta data-n-head="1" data-hid="description" name="description" content="">
<meta data-n-head="1" data-hid="keywords" name="keywords" content="">
第一步 在router里面index.js文件夹中
routes: [
{
path: '/',
name: 'main',
component: Main,
meta: {
title: '首页title内容',
content:{
keywords:'这里是第一个keywords',
description:'这里是第一个description',
},
}
},
{
path: '/trueB
全部评论 (0)
还没有任何评论哟~
