1

I'm trying to figure out how to implement Schema.org right, and since the very beginning I faced some issues and I would be very happy if you make it clearer for me.

First of all, basic structure of the main page:

<body>
  <main>
    <article>
      <h2><a href="/title_1.html">Title #1</a></h2>
      <img>
      <p>Excerpt</p>
    </article>
    <article>
      <h2><a href="/title_2.html">Title #2</a></h2>
      <img>
      <p>Excerpt</p>
    </article>
    <article>
      <h2><a href="/title_3.html">Title #3</a></h2>
      <img>
      <p>Excerpt</p>
    </article>
    <footer>Pagination 1..2..3</footer>
  </main>
  <aside>
    <div>banners and widgets</div>
  </aside>
</body>

So the homepage is basically a set of article previews with images, titles and short paragraph + some additional things that are omitted in the example.

The thing is, that if I got it right, I shouldn't apply detailed schema to the titles, images, excerpts but I should simply indicate the URL to where the full article located, right? So I did something like this:

<body itemscope itemtype="https://schema.org/WebPage">
  <main itemprop="mainEntity">
    <article itemscope itemtype="https://schema.org/Article">
      <link itemprop="mainEntityOfPage" href="/title_1.html">
      <h2><a href="/title_1.html" itemprop="url">Title #1</a></h2>
      <img>
      <p>Excerpt</p>
    </article>
    <article itemscope itemtype="https://schema.org/Article">
      <link itemprop="mainEntityOfPage" href="/title_2.html">
      <h2><a href="/title_2.html" itemprop="url">Title #2</a></h2>
      <img>
      <p>Excerpt</p>
    </article>
    <article itemscope itemtype="https://schema.org/Article">
      <link itemprop="mainEntityOfPage" href="/title_3.html">
      <h2><a href="/title_3.html" itemprop="url">Title #3</a></h2>
      <img>
      <p>Excerpt</p>
    </article>
    <footer>Pagination 1..2..3</footer>
  </main>
  <aside>
    <div>banners and widgets</div>
  </aside>
</body>

The Google Structure Tool pop ups with a bunch of errors: missing author, headline, image, date of publish and so on. Not only that I don't have this information on the main page, but if I try to set it manually via meta tag I face a problem. "author" type can accept type "Person" or "Organization", but not the text, so

<meta itemprop="author" content="Author Name">

won't be correct. So I have no idea how to set all the fields as Google requires.

1
  • Note that I removed your additional questions, because they aren’t directly related to your first question, and they are making this question too broad. -- You could ask q2 and q3 in separate question posts (one question per post).
    – unor
    Commented Mar 8, 2017 at 15:35

1 Answer 1

1

About your HTML+Microdata

You can’t use the mainEntity property like that. It has to take an item (with itemscope) as value, but you are giving it the textContent of the main element as value. The main entity on your page seems to be a list of article teasers, so you could use the ItemList type:

<main itemprop="mainEntity" itemscope itemtype="http://schema.org/ItemList">

To add each item (i.e., each article teaser) to this list, you need to provide additional properties (see the properties on the ItemList type page).

You could of course also omit the mainEntity property.


Instead of providing a link element for the mainEntityOfPage property, you can use the existing a element and give it both properties:

<a href="/title_1.html" itemprop="mainEntityOfPage url">Title #1</a>

Your questions

The thing is, that if I got it right, I shouldn't apply detailed schema to the titles, images, excerpts but I should simply indicate the url to where the full article located, right?

No. The best practice is to mark up the content you provide. So if the teaser contains an image, you can use the suitable property, etc.

Providing only the url property can make sense if you care about file size, or if you have to edit the markup manually and you prefer to have to update it in one place only (i.e., the actual article page).

The Google Structure Tool pop ups with a bunch of errors

These aren’t actual errors. These are just the required properties for one of Google’s rich result. Nothing bad happens if you don’t provide them, except that you won’t get a rich result for this page, of course.

Note that Google doesn’t show their article rich result for teaser pages anyway, even if you provide all necessary properties.

If you want to provide the author for the teaser, but you don’t want to show the author’s name (not a good practice, but possible), the most simple way is to use span and meta elements (visually hidden by default):

<span itemprop="author" itemscope itemtype="http://schema.org/Person">
  <meta itemprop="name" content="" />
</span>
0

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.