K+多屏SEO手工制作配置方法
K+ 多屏 SEO 手工制作配置方法 SEO功能 手工制作 注意: 如果要在栏目页和详情页添加 SEO , 就需要 3 个公用 header 文件,即 header 首页 .html,header 列表页 .html,header 详情页 .html 如果不需要栏目和详情 seo ,只保留一个公用 header 文件,即 header 首页 .html 所有栏目页的链接参数为 menu_id=xxx 所有文章详情页的链接参数为 art_id=xxx 1. 首页 header Seo ( 网站 信息 接口 ) 在首页公用 heade 文件添加 <!-- DataConfig [{ "path": "/service/cms_article/get_seo.html", "method": "get", "queryString": ["type=3"], "objName": "index_seo" }] --> <meta name="description" content="{{index_seo.data.seo_description}}"> <meta name="keywords" content="{{index_seo.data.seo_keywords}}"> <title>{{index_seo.data.seo_title}}</title> 1. 栏目列表页 header Seo ( 栏目详细接口 ) 在列表页公用 heade 文件添加 <!-- DataConfig [{ "path": "/service/cms_article/get_seo.html", "method": "get", "queryString": ["menu_id=<%=menu_id%>","type=2"], "objName": "menu_seo" }] --> <meta name="description" content="{{menu_seo.data.seo_description}}"> <meta name="keywords" content="{{menu_seo.data.seo_keywords}}"> <title>{{menu_seo.data.seo_title}}</title> 2. 文章详情 页 header Seo ( 文章详情 接口 ) 在详情页公用 heade 文件添加 <!-- DataConfig [{ "path": "/service/cms_article/get_seo.html", "method": "get", "queryString": ["art_id=<%=art_id%>","type=1"], "objName": "art_seo" }] --> <meta name="description" content="{{art_seo.data.seo_description}}"> <meta name="keywords" content="{{art_seo.data.seo_keywords}}"> <title>{{art_seo.data.seo_title}}</title>
2019-09-06发布者:陈磊