dovetail icon indicating copy to clipboard operation
dovetail copied to clipboard

Add support for microdata

Open RoyalIcing opened this issue 5 years ago • 0 comments

See:

  • https://stackoverflow.com/questions/31861260/correct-microdata-markup-for-breadcrumbs
  • https://developers.google.com/search/docs/data-types/breadcrumb
  • https://search.google.com/structured-data/testing-tool
ListWith(Ol, schemaorg.BreadcrumbList)(
  Link("/", Span(Text("Root page"), schemaorg.ItemPropName)),
  Link("/category", Span(Text("Category page"), schemaorg.ItemPropName)),
  Span(Span(Text("This page"), schemaorg.ItemPropName)),
)

might produce something akin to:

<ol itemscope itemtype="http://schema.org/BreadcrumbList">
  <li itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem">
    <a href="/" itemprop="item">
      <span itemprop="name">Root page</span>
    </a>
  </li>
  <li itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem">
    <a href="/category" itemprop="item">
      <span itemprop="name">Category page</span>
    </a>
  </li>
  <li itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem">
    <span itemprop="item">
      <span itemprop="name">This page</span>
    </span>
  </li>
</ol>

RoyalIcing avatar Mar 13 '20 04:03 RoyalIcing