6

I believe I understand how to set up the structured data for an article page. But I have links in these articles to 1) other articles on my site, and 2) articles on other external sites.

  1. I know I can use the ItemList inside the articles for my own site. However, I'm not sure if this is the appropriate usage for this.

    The main articles will be about how to eat better, and they will also contain links to recipes on my own site (I know I can only use the Recipe schema for actual recipe pages, so that's not a concern). But the links to these pages are not the main purpose of the page. These are not articles like the Top 10 Desserts. Though I do want to mark them up with Schema.org coding.

    Also, they will not always be right next to each other. Though if ItemList is the correct usage, is it okay for the individual parts to be separated by regular article text?

  2. Some articles will also link out to external sites. Should I even bother marking these up for Schema.org? Or is it best to skip them?


Would it be okay to put the links to the other articles as articles as well, instead of ItemList? If so, how do I do that?

This is a simplified version of the main part of the page, with what I think are the basic Schema.org needed items.

<div itemscope itemtype="http://schema.org/Article">
  <div itemprop="publisher" itemscope itemtype="http://schema.org/Organization">Feast for Freedom</div>

  <meta itemprop="url" content="https://feast-for-freedom.com/tips/item/29-planning/191-how-and-why-to-cut-out-packaged-food-for-1-week"></div>

  <div itemprop="name">How and Why to Cut Out Packaged Food for 1 Week</div>

  <div itemprop="author" itemscope itemtype="http://schema.org/Person">
    <div itemprop="name">Thora Toft"></div>
  </div>

  <div itemprop="datePublished" content="2017-06-06">June 6, 2017</div>

  <div itemprop="articleSection">Planning</div>

  <div><img itemprop="image" src="/images/cook/no-packaged-food-2.jpg"/></div>

  <div itemprop="articleBody">

    <p>Some content of the article.</p>
    <p>Some content of the article.</p>
    <p>Some content of the article.</p>
    <p>Some content of the article.</p>

      <div><a href="/recipe/salad">Salad</a></div>
      <div><a href="/recipe/soup">Soup</a></div>

    <p>Some content of the article.</p>

    <div><a href="/recipe/chicken">Chicken</a></div>
    <div><a href="/recipe/fish">Fish</a></div>

    <p>Some content of the article.</p>
    <p>Some content of the article.</p>

  </div>
</div>
1
  • 1
    I would suggest only marking up the main content of each page, the internal page you link to would then also be marked up on its own page.
    – Willtech
    Commented May 22, 2018 at 4:34

3 Answers 3

3

As Willtech briefly alludes to, Schema is meant to mark up the full content you are using it to describe. So using the markup for your full articles and recipes is correct. But you should not use article markup for links - that would basically be saying, "this one little link tag - the link itself, not the content you will find after following the link - is an article." Instead, just use the appropriate Schema markup on the page that the link points to. So whether the link points to your site or an external one, don't use any Schema for that portion.

Your article is correctly marked up as-is, without adding or removing any Schema (though I'm not entirely sure why you have divs wrapped around your links. If those are somewhat list-like, a <ul> with <li>s would be more appropriate).

1
  • Thank you WebElaine, Alexis and and Willtech, After your comments, I've decided not to add any schema to the recipe links. WebElaine, thank you for the very clear summary of those schema codes. As for the divs, I just used those that way for my simplified example.
    – Thora
    Commented May 23, 2018 at 14:53
3

You have quite a few possible markups for your anchors to tell search engines what the link is about compared to the current page:

relatedLink

Say you are talking about creme brulé, you could have a relatedLink to a page speaking of caramel.

significantLink

A link which many people click as per the docs. I'm not too sure what they could be in your realm. Maybe a link to another very similar recipe.

speakable

A link to a page that can be read by a robot (text to speech) particularly useful for blind people.

discussionURL

Say you also have a forum on your website, you could have a link to the forum about this page's topic (i.e. Dessert, Vegetables, Salad…). By clicking that link the user can interact with others, somehow.

genre

Not too sure that would apply well to food related posts. That is, they are probably all viewed as part of the same genre: cuisine. Although maybe you could have separate types of cuisines (India, French, African, Middle East, Chinese…).

isBasedOn

Now this one can be interesting, maybe you describe how to do a vegetable quiche (yuck!) and want to have a link to the standard quiche, this is a perfect markup for that one.

license

Not useful in your page content. Can be used by your one link to your website license page (i.e. copyright, terms & conditions, etc.).

material

For food this one is probably not quite appropriate.

publishingPrincipals

Like the license, not useful for your main content.


There are other URL markups, although probably not useful in this situation.

You can find the complete list on the Schema WebPage list of supported markups.

Now, as @WebElaine mentioned, this will take you time that could possibly be better spent making sure the rest of your markup is correct.

Also, in links, it is customary to use the rel="..." attribute. For example, the license mentioned above can be marked with rel="license".

2

The mentions property can be used for references to other creative works. It doesn’t matter whether these creative works are published on your own or on an external site.

Microdata example:

<article itemscope itemtype="http://schema.org/Article">

  <!-- an external creative work -->
  <p itemprop="mentions" itemscope itemtype="http://schema.org/BlogPosting" itemid="http://example.com/blog/foo">
    I read <a itemprop="url" href="http://example.com/blog/foo">a blog post about this issue</a>, but it didn’t give a solution.
  </p>

  <!-- an internal creative work -->
  <p itemprop="mentions" itemscope itemtype="http://schema.org/Recipe" itemid="/recipes/noodle-soup-with-beans">
    Then I cooked my favorite recipe: 
    <a itemprop="url" href="/recipes/noodle-soup-with-beans">
      <span itemprop="name">Noodle soup with beans</span>
    </a>
  </p>

</article>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.