SEO 之GOOGLE结构化数据标记

迅睿框架 更新 2025-04-20 22:19:59 莫愁

这几天对google的数据优化,在show.html中head

<!--  结构化数据标记。 -->

<script type="application/ld+json">{

  "@context": "http://schema.org",

  "@type": "Article",

  "headline": "正常",

  "datePublished": 空

  "image": "空",

  "articleBody": "正常"

"author":空

}

</script>

源码:

<script type="application/ld+json">{
  "@context": "http://schema.org",
  "@type": "Article",  //文章模式
  "headline": "{$meta_keywords}",//标题
  "datePublished": {dr_date($t['_inputtime'], 'Y-m-d')},//时间
  "image": "{dr_get_file($t['thumb'])}",//文章第一张图
  "articleBody": "{$meta_description}"//内容简介
"author": {$t['author']}//作者
}
</script>

方案

  • 迅睿官方创始人 #1 · 2025-04-15 14:27:48
    show.html页面不应该加前缀$t内容页的模板标签生成工具:https://www.xunruicms.com/doc/code/show.html
  • 莫愁 #2 · 2025-04-15 14:57:38
    想要提取文章中的第1张图片怎么搞
  • 迅睿官方创始人 #3 · 2025-04-15 14:58:57
    满意答案
  • jdcom #4 · 2025-04-16 16:53:31
    支持,学习,加油!
  • 莫愁 #5 · 2025-04-20 22:19:04
    <!-- 结构化数据标记。 --><script type="application/ld+json">{ "@context": "http://schema.org";, "@type": "Article", "headline": "{$meta_keywords}", "datePublished": {dr_date($_inputtime, 'Y-m-d')} , "image": "{php $imgs = dr_get_content_img($content, 1);}<img src="{$imgs[0]}">", "articleBody": "{$meta_description}""author": {$author} }</script>
  • 莫愁 #6 · 2025-04-20 22:19:59
    @迅睿官方创始人:分享,下面是正确的代码

迅睿系统漏洞

站群分站系统
站群分站系统(2026-10-15)
子站域名新增llms.txt访问
GEO系统
GEO系统(2026-10-14)
修复下载zip空白地址问题 修复流量复刻和任务队列错误
GeoSeo收录宝
GeoSeo收录宝(2026-10-14)
新增 站长工具箱 前端首页自动调用meta 数据
滑块验证码 Gocaptcha
滑块验证码 Gocaptcha(2026-10-13)
基于开源项目 go-captcha 的行为验证码插件,滑动拼图、区域...
GeoSeo工具箱
GeoSeo工具箱(2026-10-13)
优化巡检任务
GeoSeo排名助手
GeoSeo排名助手(2026-10-11)
加入大模型自定义
SEO聚合关键字
SEO聚合关键字(2026-10-11)
优化关键字列表页最多支持1万篇文章,过多会导致服务器扛不住;
CMS内容同步复制
CMS内容同步复制(2026-10-10)
增加时间是否更新的开关