在博客中应用 JSON-LD 架构
应用 JSON-LD 我一直很好奇,json-ld schema 到底是否真的会对 seo 产生积极影响。 所以我一直想试试看,但因为没时间而迟迟没有尝试,直到今天才应用上。 不过,我知道对于评论、评价,或者 product 商品信息这类内容,由于需要包含价格等信息,最好还是必须应用 json-ld。 不过,博客会有什
应用 JSON-LD 我一直很好奇,json-ld schema 到底是否真的会对 seo 产生积极影响。 所以我一直想试试看,但因为没时间而迟迟没有尝试,直到今天才应用上。 不过,我知道对于评论、评价,或者 product 商品信息这类内容,由于需要包含价格等信息,最好还是必须应用 json-ld。 不过,博客会有什
目录
应用 JSON-LD 时,即使像上面那样经过 \ 转义处理,据说 JSON-LD 解析器也能正常解析。 我还在想这会不会有问题,于是从 GPT 到 Google 搜索都查了很多,最后 GPT 说没问题,就决定不管了。
关于这个问题,Google 说要添加,所以我就添加了。
->setProperty('query-input', 'required name=search_term_string'){
"@context": "https:\/\/schema.org",
"@type": "CollectionPage",
"name": "GGAMI.NET-dev : 개발",
"url": "https:\/\/ggami-dev.net\/categories\/dev?page=4",
"mainEntity": {
"@type": "ItemList",
"itemListElement": [{
"@type": "ListItem",
"position": 1,
"url": "https:\/\/ggami-dev.net\/posts\/159"
}, {
"@type": "ListItem",
"position": 2,
"url": "https:\/\/ggami-dev.net\/posts\/154"
}, {
"@type": "ListItem",
"position": 3,
"url": "https:\/\/ggami-dev.net\/posts\/152"
}, {
"@type": "ListItem",
"position": 4,
"url": "https:\/\/ggami-dev.net\/posts\/149"
}, {
"@type": "ListItem",
"position": 5,
"url": "https:\/\/ggami-dev.net\/posts\/148"
}, {
"@type": "ListItem",
"position": 6,
"url": "https:\/\/ggami-dev.net\/posts\/144"
}, {
"@type": "ListItem",
"position": 7,
"url": "https:\/\/ggami-dev.net\/posts\/140"
}, {
"@type": "ListItem",
"position": 8,
"url": "https:\/\/ggami-dev.net\/posts\/139"
}, {
"@type": "ListItem",
"position": 9,
"url": "https:\/\/ggami-dev.net\/posts\/138"
}, {
"@type": "ListItem",
"position": 10,
"url": "https:\/\/ggami-dev.net\/posts\/124"
}, {
"@type": "ListItem",
"position": 11,
"url": "https:\/\/ggami-dev.net\/posts\/119"
}, {
"@type": "ListItem",
"position": 12,
"url": "https:\/\/ggami-dev.net\/posts\/116"
}]
}
}我将其应用为 CollectionPage。据说 CollectionPage 的 url 可以包含参数值。
因此,我添加了 categories/dev?page=4 这样的参数并应用了。
{
"@context": "https:\/\/schema.org",
"@type": "BlogPosting",
"mainEntityOfPage": {
"@type": "WebPage",
"inLanguage": "ko",
"id": "https:\/\/ggami-dev.net\/posts\/220"
},
"headline": "laravel model casts 에서 laravel data collection 사용하는 방법",
"articleBody": "모델의 배열을 커스텀 데이터 컬렉션으로 캐스팅하는 방법을 알려드립니다. 코드 한 줄로 강력한 데이터 관리를 경험해 보세요.",
"articleSection": "[\"\\uac1c\\ubc1c\"]",
"keywords": ["Laravel 모델 캐스팅", "Laravel Collection 사용법", "Laravel DataCollection 클래스", "ConfigValueData 컬렉션", "Laravel Eloquent 캐스트"],
"author": {
"@type": "Person",
"name": "GGAMI"
},
"publisher": {
"@type": "Organization",
"name": "GGAMI.NET-dev",
"url": "https:\/\/ggami-dev.net"
},
"datePublished": "2024-03-15T15:14:25+00:00",
"dateModified": "2024-03-15T15:14:25+00:00"
}就是这样实现的。
至此,json-ld 架构注册完成了。
不过说实话,我也不太确定这样注册架构是否正确。既然已经注册了,之后就看看随着时间推移,排名会受到多大影响,或者是否会有影响吧。
顺便说一下,可以在以下网站进行测试:
可以在这两个网站进行测试。