我正在建立一个网页,列出每个国家的典型菜肴。每道菜都放在自己的article里,这一切都很好。但我不知道是否有办法将Recipe与国家联系起来。用http://schema.org/Country指定国家是否有意义,如果是的话,我如何将其与菜肴联系起来?
我曾想过把主语定义为一个国家,然后使用http://schema.org/additionalProperty,但这似乎没有什么意义,因为它期待的是一个PropertyValue,而菜谱却不是。
<main>
<h1>France</h1>
<p>
<span class="capital" title="Capital">Paris</span>
<span class="member-since" title="Member of the EU since 1958">1958</span>
</p>
<article id="recipe-1" itemscope itemtype="http://schema.org/Recipe">
<h1>Éclairs</h1>
<!-- A lot of recipe-related stuff -->
</article>
<article id="recipe-2" itemscope itemtype="http://schema.org/Recipe">
<h1>Macaron</h1>
<!-- A lot of recipe-related stuff -->
</article>
<article id="recipe-3" itemscope itemtype="http://schema.org/Recipe">
<h1>Tarte Tatin</h1>
<!-- A lot of recipe-related stuff -->
</article>
</main>发布于 2017-05-10 06:33:40
您可以提供Recipe的美食及其recipeCuisine属性:
菜谱的菜肴(例如,法国或埃塞俄比亚)。
它需要一个Text值。
还有locationCreated属性,它需要一个Place值(其中包括Country),但是在这个上下文中使用它可能有点牵强。此外,也不清楚它是指菜谱最初来自何处,还是指创建书面表单的位置。
Schema.org似乎没有提供一个属性来直接连接Country和Recipe。但是您仍然可以通过WebPage连接这些项目。
因此,例如,如果您说WebPage about Country和WebPage mainEntity ItemList,并将每个Recipe作为itemListElement,那么至少有一些连接(关于特定国家的页面有一个食谱列表作为主要内容=菜谱可能与那个国家相关)。
https://stackoverflow.com/questions/43878609
复制相似问题