json-ld - 多门课程需要 JSON-LD 结构化数据示例
问题描述
我参考了Google 给出的以下示例:
<html>
<head>
<title>Introduction to Computer Science and Programming</title>
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "Course",
"name": "Introduction to Computer Science and Programming",
"description": "Introductory CS course laying out the basics.",
"provider": {
"@type": "Organization",
"name": "University of Technology - Eureka",
"sameAs": "http://www.ut-eureka.edu"
}
}
</script>
</head>
<body>
</body>
</html>
但我有一个包含软技能课程列表的页面。谷歌也给出了一个叫做的东西ItemList
,但没有给出如何将它与Course
. 如何在 JSON-LD 中指定多个 Courses 结构化数据?谢谢!
解决方案
我遇到过同样的问题。像这样再打开一个脚本就足够了:
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "Course",
"name": "Introduction to Computer Science and Programming",
"description": "Introductory CS course laying out the basics.",
"provider": {
"@type": "Organization",
"name": "University of Technology - Eureka",
"sameAs": "http://www.ut-eureka.edu"
}
}
</script>
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "Course",
"name": "Introduction to Computer Science and Programming",
"description": "Introductory CS course laying out the basics.",
"provider": {
"@type": "Organization",
"name": "University of Technology - Eureka",
"sameAs": "http://www.ut-eureka.edu"
}
}
</script>
推荐阅读
- ios - 增加单元格内的 UiImageView 高度时如何增加 tableViewCell 高度?
- keycloak - 我可以在 keycloak 服务器中为 userId 定义自定义格式吗?
- git - IntelliJ IDEA -GIT 的好处?
- c - 如何在变量命名中使用日语字符?
- excel - VBA将某些列复制到特定工作表
- sails.js - 嗨,我对风帆很陌生。任何人都可以帮助我了解如何以及在哪里为 mysql 数据库传递 sql 查询
- c# - 在 C# WPF 中逐行读取 RTF 文件
- junit - Junit测试,验证返回的值是int基本类型
- angular - 使用@Input装饰器时如何解决'属性'foo'没有初始化程序并且没有在构造函数中明确分配'?
- mongodb - MongoDB效率中的文档模式