我在电子商务产品页面上同时拥有Micro Data和JSON-LD,描述了同样的事情(在我的情况下是产品).由于超出此问题范围的原因,我无法删除这两种格式中的任何一种.我想知道:
这对谷歌来说是个问题吗?结构化数据测试工具确实显示两个项目(产品)而不是一个.
如果一个属性(假设产品的名称)在两种格式之间略有不同,那么两种格式中的任何一种,例如JSON-LD是否优先?
我目前正致力于在/ about-page中添加Web应用程序的结构化数据.我想在那里添加一个属性.在下面的代码中,我正在使用和(正如我在schema.org中看到的那样).namevalue
问:我必须只使用value不带name,并设置如Modularity为value拖放的描述?
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "product",
"name":"Product_name",
"additionalProperty":
{
"@type":"propertyValue",
"name":"Main features",
"value":
[
{
"@type":"propertyValue",
"name": "Detailed documentation",
"value": "description_of_the_documentation"
},
{
"@type":"propertyValue",
"name": "Fully responsive",
"value": "description_of_the_responsiveness"
}
],
"@type":"propertyValue",
"name":"Other features",
"value":
[
{
"@type":"propertyValue",
"name": "Modularity",
"value": "description_of_the_modularity"
},
{
"@type":"propertyValue",
"name": "Frequent updates",
"value": "description_of_the_updates"
}
]
}
}
</script>
Run Code Online (Sandbox Code Playgroud) 我使用这个工具来测试我的结构化数据:https : //search.google.com/structured-data/testing-tool
这是我的页面:https : //www.offersprive.eu/it/prod/Black%20Latte/56
如果我尝试检查它,则响应为空
...但是如果我复制并粘贴我的 html 内容,该工具会正确读取它
我该怎么做才能阅读链接内容?这是 React 内容加载的问题吗?
谢谢。
我正在使用一些Microdata来描述一篇博文,我BlogPosting对Google Developers Testing Tool 对Schema.org的价值回报感到惊讶.
我原以为它是itemprop url,而不是网站URL和项目的合并id.
我做错了什么,还是只是谷歌显示问题?
<div itemscope="itemscope"
itemprop="blogPost"
itemtype="http://schema.org/BlogPosting"
id="foobar">
<a itemprop="url" href="/realone">real</a>
</div>
Run Code Online (Sandbox Code Playgroud)
https://developers.google.com/structured-data/testing-tool/返回的值:
BlogPosting: http://www.example.com/foobar
url: http://www.example.com/realone
Run Code Online (Sandbox Code Playgroud) 类型的Schema.org对象Person可以具有sameAs类型 的属性URL。根据谷歌的结构化数据网站,sameAs属性可以是单个项目或数组。
Schema.org 上的文档没有提及是否sameAs可以是单个项目或数组。这只是 Google 偏离 Schema.org 的做法吗?或者 Schema.org 中的所有属性都可以是单个项目或数组吗?
我找不到一致的方法来记录 .NET Core 微服务中的异常。信息消息日志记录准则很简单(使用 Microsoft.Extension.Logging):
_logger.LogInformation($"Reading file {path}..."); // bad
_logger.LogInformation("Reading file {Path}...", path); // good
Run Code Online (Sandbox Code Playgroud)
第二种变体的好处是结构化信息:通过使用巧妙的日志事件路由器(例如带有 RenderedCompactJsonFormatter 的 Serilog),路径被写入日志事件的单独属性。
错误记录会让事情变得更糟。要求很明显:
所以,我希望错误报告看起来像
throw new MyException("Failed to read file {Path}", path);
Run Code Online (Sandbox Code Playgroud)
和错误记录 - 就像
catch(MyException e)
{
_logger.LogError(e, "Processing error");
}
Run Code Online (Sandbox Code Playgroud)
这里的 LogError 方法记录了完整的错误描述,但它不是结构化的:路径没有添加为属性。我尝试让 MyException 保存消息模板和参数,但这种方法有两个问题:
请告诉我你是如何处理这个问题的。
我偶尔会使用文本文件,其中某些部分确实有多个具有相同结构的段落.这是一个例子:
Some unrelated preface I'm not interested in... Lorem ipsum dolor sit amet,
consectetur adipiscing elit. Etiam scelerisque.
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
Etiam scelerisque. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam scelerisque.
001 [SomeTitle 1] - Some Subtitle 1
Name: SomeName
Area: SomeArea
Content: Some multi-line comment...Lorem ipsum dolor sit amet, consectetur
adipiscing elit. Etiam scelerisque. Lorem ipsum dolor sit amet,
consectetur adipiscing elit. Etiam scelerisque.
002 [SomeTitle 2] - Some Subtitle 2
Name: …Run Code Online (Sandbox Code Playgroud) itemprop="articleBody"在多个元素上使用是不好的做法。我问是因为我的页面是这样的:
<main class="post content">
<article itemscope itemType="http://schema.org/BlogPosting">
<header>
<h1 itemprop="headline">My Blog Headline</h1>
<p><time class="dt-published" itemprop="datePublished" pubdate datetime="2015-01-24 19:08:00">Jan 24, 2015</time></p>
<p itemprop="author">Published by <a class="p-author h-card" itemprop="name" href="http://author.co.uk">Author Name</a></p>
</header>
<section itemprop="articleBody">
<p>Article body</p>
<p>Article body</p>
</section>
<section class="gallery">
...
</section>
<section itemprop="articleBody">
<p>Article body</p>
<p>Article body</p>
</section>
</article>
</main>
Run Code Online (Sandbox Code Playgroud)
我的文章正文之间有一个画廊,可以像上面一样itemprop="articleBody"在多个sections 上使用吗?
PSdisplay: none在我的上使用也是不好的做法itemprop="author"吗?我不希望它成为页面设计的一部分,还有其他方法吗?
我在我的网站上使用 schema.org (Breadcrumb) 和开放图协议。谷歌的结构化数据测试工具将它们混合在一起并抛出错误。
您可以将代码复制并粘贴到工具中以查看错误消息。
我误解或做错了什么?谢谢你的帮助。
这是代码:
<html lang="en" prefix="og: http://ogp.me/ns# fb: http://ogp.me/ns/fb#">
<head>
<meta property="og:url" content="http://example.com/examples/example" />
<meta property="og:type" content="website" />
<meta property="og:title" content="Examples and so on" />
<meta property="og:description" content="A lot of examples here" />
<meta property="og:image" content="http://example.com/example.jpg" />
</head>
<body>
<ol class='breadcrumb' vocab='http://schema.org/' typeof='BreadcrumbList'>
<li property='itemListElement' typeof='ListItem'><a property='item' typeof='WebPage' href='/'><span property='name'>Home</span></a><meta property='position' content='1'></li>
<li property='itemListElement' typeof='ListItem'><a property='item' typeof='WebPage' href='/examples'><span property='name'>Examples</span></a><meta property='position' content='2'></li>
<li property='itemListElement' typeof='ListItem'><a property='item' typeof='WebPage' href='/examples/example'><span property='name'>Examples and so on</span></a><meta property='position' content='3'></li>
</ol>
</body>
</html>
Run Code Online (Sandbox Code Playgroud) 将json-ld添加到 vue 应用程序的正确方法是什么\xe2\x80\x99 ?
\n\n我\xe2\x80\x99添加了一些结构化数据,但Google结构化数据测试工具未检测到我的网址上的数据。但是,如果我查看 url 的来源并将其粘贴到测试工具中,它会检测到我的数据。缺少什么?
\nstructured-data ×10
schema.org ×5
json-ld ×3
microdata ×3
.net ×1
c# ×1
command-line ×1
exception ×1
html ×1
json ×1
logging ×1
multiline ×1
parsing ×1
reactjs ×1
vue.js ×1