


给博客添加description描述有利于SEO优化,使用zblog博客默认是不能给不同文章不同页面自定义描述的,因此博主通常只在首页添加了description描述,昨天有个群友问我怎么自定义每篇文章的描述内容,我想了想可以通过调用文章的摘要作为该文章的description。
自定义zblog文章描述:
1.在当前zblog主题的templage目录下找到single.html文件并对其进行编辑
2.在下面添加以下代码
<meta name="description" content="<#article/tag/intro#>"/>
如果原来有了description就用该句替换掉原来的
注:使用<#article/tag/intro#>调用摘要,默认会显示出html代码,所以请慎重使用。
转载请注明出处:博客吧



亲爱的:若该文章解决了您的问题,可否收藏+评论+分享呢?
文章评论 本文章有个评论