Commit 323b4a6a by yanju

seo 添加

parent 968d4868
......@@ -13,7 +13,9 @@ module.exports = {
meta: [
{ charset: 'utf-8' },
{ name: 'viewport', content: 'width=device-width, initial-scale=1' },
{ hid: 'description', name: 'description', content: process.env.npm_package_description || '' }
{ hid: 'description', name: 'description', content: '云里云外,凝心聚力,筑梦未来' },
{ hid: 'keywords', name: 'keywords', content: '云里云外开源社区,开源社区,云里云外开源,开源、开源软件,开源网站,开源代码,java开源,perl开源,ruby开源,php开源,开源项目,python开源' },
],
link: [
{ rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }
......
......@@ -134,11 +134,22 @@
let articleDetail = await $axios.$get(config.api.get.Question.detail+params.id);
return {articleDetail:articleDetail.data}
},
head () {
return {
title: this.articleDetail.questionTitle + ' - 云里云外开源社区',
meta: [
{ hid: 'description', name: 'description', content: this.articleDetail.questionAbstract },
{ hid: 'keywords', name: 'description', content:this.tagString }
]
}
},
data(){
return{
commentContent:'',
commentList:[],
answerList:[],
tagString:''
}
},
computed:{
......@@ -152,7 +163,17 @@
created(){
this.dataGetReAnswerList();
globalBus.$emit(config.event.listenDetailInfo,this.articleDetail.questionTitle,'answer')
globalBus.$emit(config.event.listenDetailInfo,this.articleDetail.questionTitle,'answer');
this.articleDetail.tags.map((val,index)=>{
if(index<this.articleDetail.tags.length-1){
this.tagString =this.tagString + val.tagName +','
}else{
this.tagString =this.tagString + val.tagName
}
})
},
mounted(){
......
......@@ -131,10 +131,23 @@
let articleDetail = await $axios.$get(config.api.get.Blog.detail+params.id);
return {articleDetail:articleDetail.data}
},
head () {
return {
title: this.articleDetail.blogTitle + ' - 云里云外开源社区',
meta: [
{ hid: 'description', name: 'description', content: this.articleDetail.blogAbstract },
{ hid: 'keywords', name: 'description', content:this.tagString }
]
}
},
data(){
return{
commentContent:'',
commentList:[],
tagString:''
}
},
......@@ -148,7 +161,17 @@
},
created(){
globalBus.$emit(config.event.listenDetailInfo,this.articleDetail.blogTitle,'blog')
globalBus.$emit(config.event.listenDetailInfo,this.articleDetail.blogTitle,'blog');
this.articleDetail.tags.map((val,index)=>{
if(index<this.articleDetail.tags.length-1){
this.tagString =this.tagString + val.tagName +','
}else{
this.tagString =this.tagString + val.tagName
}
})
},
......
......@@ -49,7 +49,7 @@
let blogList = await $axios.$get(config.api.get.Blog.hotList,{
params:{
page:1,
size:5,
size:20,
}
});
......
......@@ -139,6 +139,15 @@
let articleDetail = await $axios.$get(config.api.get.Content.detail+params.id);
return {articleDetail:articleDetail.data}
},
head () {
return {
title: this.articleDetail.title + ' - 云里云外开源社区',
meta: [
{ hid: 'description', name: 'description', content: this.articleDetail.subTitle },
]
}
},
data(){
return{
commentContent:'',
......@@ -149,6 +158,8 @@
}
},
created(){
this.dataGetHotTagsList();
this.dataGetNewsList();
......
......@@ -131,31 +131,21 @@
let articleDetail = await $axios.$get(config.api.get.Project.detail+params.id);
return {articleDetail:articleDetail.data}
},
head () {
return {
title: this.articleDetail.projectName + ' - 云里云外开源社区',
meta: [
{ hid: 'description', name: 'description', content: this.articleDetail.projectDescription },
{ hid: 'keywords', name: 'description', content:this.tagString }
]
}
},
data(){
return{
articleDetail2:{
allowComment:true,
allowForward:true,
blogAbstract:'',
blogId:'',
blogTitle:'',
category:'',
categoryId:'',
commentNumber:'',
content:'',
cover:'',
createTime:'',
originLink:'',
tags:[],
topics:[],
userId:[],
userNick:[],
viewNumber:1,
viewPrivileges:1
},
commentContent:'',
commentList:[],
tagString:''
}
},
......@@ -170,7 +160,17 @@
},
created(){
globalBus.$emit(config.event.listenDetailInfo,this.articleDetail.projectName,'project')
globalBus.$emit(config.event.listenDetailInfo,this.articleDetail.projectName,'project');
this.articleDetail.tags.map((val,index)=>{
if(index<this.articleDetail.tags.length-1){
this.tagString =this.tagString + val.tagName +','
}else{
this.tagString =this.tagString + val.tagName
}
})
},
mounted(){
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment