schema.org を使用して一連の記事をフォーマットしたいのですが、記事は単なるテキストではありません。これらには、リンク、<em>
、<strong>
、およびその他の軽量マークアップが含まれています。text
これをプロパティに正しく配置するにはどうすればよいですか?
そこにマークアップを入れることだけを考えましたが、注釈付きの HTML 内にある場合は理にかなっています。
<div itemscope itemtype="http://schema.org/CreativeWork">
<h1 itemprop="name">An example I just wrote</h1>
<p itemprop="text">here's a <a href="http://example.com">link</a>, it's very <em>important</em></p>
</div>
しかし、これを JSONLD として保存する場合、テキストを HTML として解釈する必要があると仮定するのはかなり奇妙です。
{
"@context": "http://schema.org",
"@type": "CreativeWork",
"name": "An example I just wrote"
"text": "here's a <a href=\"http://example.com\">link</a>, it's very <em>important</em>"
}
Markdown で書いている可能性は十分にあります。
{
"@context": "http://schema.org",
"@type": "CreativeWork",
"name": "An example I just wrote"
"text": "here's a [link](http://example.com), it's very _important_"
}
または、同じ考えを表現できる他の言語。また、どの言語を使用しているかはかなり重要です。それは、テキストをどのように読むべきかを示しているからです。