Search code examples
htmlfeedmicrodataschema.org

How to add Schema.org type for feeds?


<div itemscope="" itemtype="http://schema.org/ItemList" >
  <span itemprop="???"><a href="feed.rss">RSS of this section</a></span>

  <ul>
    <li itemprop="itemListElement" itemscope itemtype="http://example.net/Item">
    <a href="" itemprop="url">title</a>
    </li>
    <li></li>
    <li></li>
    <li></li>
  </ul> 
</div>

What about feed in span tag? Is there any Schema.org type for that?


Solution

  • Update 2019: Schema.org will likely have a webFeed property for podcasts soon (see pull request), and its definition will probably be extended so that it can be used in non-podcast contexts, too, but I’d doubt that it will be possible to add it to ItemList.


    The Schema.org vocabulary doesn’t define a class or a property for feeds.

    But HTML5 defines a way to link feeds: use the alternate link type together with the type attribute set to application/rss+xml resp. application/atom+xml.

    <a href="feed.rss" rel="alternate" type="application/rss+xml">RSS of this section</a>
    

    (The first feed linked that way is treated as the default feed for autodiscovery; so when you have several section feeds linked on the same page, you should probably make sure that the first feed is a general one and not specific to only one section.)