blogger - 带有关键字的 JSON LD 格式博客发布
问题描述
我发现我可以将 JSON-LD 格式的 BlogPosting 与关键字一起使用。<meta content='put all your keywords here separated by comma' name='keywords'/>
当它们在 blogspot 的单个博客文章中定义时,有没有办法自动使用 JSON-LD 中的关键字?有没有办法“称呼”他们喜欢"description": "<data:view.description.escaped/>"
或"keywords": "<data:post.labels/>",
显示单个帖子的元描述?
解决方案
No you can't.
There's no way to get post object components outside widget, you can get it simply within Blog widget using <data:post.labels/>
array:
<meta name='keywords' content='<b:loop values='data:post.labels' var='label'><data:label.name/>,</b:loop>'/>
BUT meta tags in <body>
is invalid as per HTML4.01, it should be within <head>
tag.
On the other hand, meta Keywords is not supported by google anymore since 2009, you don't need to use it just include post tags within post search description in a balanced way.
Although there are some other ways to tell search engines about your tags or nested pages, like Schema.org/Breadcrumbs and hAtom.
推荐阅读
- pandas - Pandas 数据框选择 df['a'][50][:51]
- python - 如何在我的 JSON 列表中添加新字典
- apache-arrow - 我们如何在 Apache Arrow 中存储哈希表?
- java - Maven 在代码中下载依赖项
- jquery - 如何让一个html页面上的事件更改影响另一个使用jquery有条件的页面?
- codenameone - IOS调试版本在下载前和下载后两次显示应用名称
- javascript - 在 Coderbytes Letter Changes 练习中处理数字和特殊字符时遇到问题
- unity3d - 将 2D 球从另一个 2D 对象弹起,然后使该对象在 Unity 中消失
- javascript - javascript - 如何在 node.js 中等待异步循环
- amazon-web-services - 如何在 AWS Sagemaker 中查找不同区域的 XGBoost 容器