D
D
Dmitry Filandor2015-01-15 14:53:14
Search Engine Optimization
Dmitry Filandor, 2015-01-15 14:53:14

How to properly use schema.org microdata?

Hello! I want to put micromarking on the site of aphorisms ... I ask for the help of specialists, did I understand correctly ...
As far as I understood correctly, for an aphorism (title, picture, text, author, comments) it suits me - ruschema.org/Article
Do I understand correctly that microdata for example:

<div itemscope itemtype="http://schema.org/Painting">
    <h1 itemprop="name">Портрет Гарсиа Лорки</h1>
    <img src="http://uploads8.wikipaintings.org/images/salvador-dali/portrait-of-garcia-lorca.jpg!Blog.jpg" alt="Портрет Гарсиа Лорки - Сальвадор Дали"
title="Портрет Гарсиа Лорки - Сальвадор Дали" />
    <a href="/es/salvador-dali" itemprop="author">Сальвадор Дали</a>
    <span itemprop="genre">Портрет</span>
    <span itemprop="description">Портрет Федерико Гарсиа Лорки, выполненный в Café de Oriente. Мадрид. (Бумага, чернила. 1924 г.)</span>
</div>

will go at the end of the aphorism...?
that is, there is the text of my aphorism and below is the markup, as a result:
<title>Весь Мир театр... или Цирк?</title>
<img>...<img>
<p>Когда Шекспир писал, что «весь мир — театр», он еще ничего не знал о цирке...
<div>камменты...<div>
 
и дальше микроразметка:
<div itemscope itemtype="http://schema.org/Painting">
    <h1 itemprop="name">Портрет Гарсиа Лорки</h1>
    <img src="http://uploads8.wikipaintings.org/images/salvador-dali/portrait-of-garcia-lorca.jpg!Blog.jpg" alt="Портрет Гарсиа Лорки - Сальвадор Дали"
title="Портрет Гарсиа Лорки - Сальвадор Дали" />
    <a href="/es/salvador-dali" itemprop="author">Сальвадор Дали</a>
    <span itemprop="genre">Портрет</span>
    <span itemprop="description">Портрет Федерико Гарсиа Лорки, выполненный в Café de Oriente. Мадрид. (Бумага, чернила. 1924 г.)</span>
</div>

It turns out that under my aphorism there will be another block with duplicate values, and all together it will not look very nice.
-----
In order for the answer to be complete and with a "live" solution, I will write what happened:
since there is too much html formatting in the article and I can’t combine it with micromarkup, I made it a block below and hid it so that the hidden block did not take up space, gave the block a small height (I don't know if this is right), in the end, this is what happened - 90c9b357239f401585dc6e13c2aeebae.pngentry
-
thanks to diamond for the hint on visibility for the user.
Last Option:
<article itemscope itemtype="http://schema.org/Article">
            <meta itemprop="name" content='@Model.TitleBL' />
            <meta itemprop="inLanguage" content="ru" />
            <meta itemprop="articleBody" content='@Model.TextBL' />
            <meta itemprop="author" content='@Model.avtor' />
            <meta itemprop="publisher" content='@Model.user_nikname' />
            if (Model.PostPicture != null) {  <meta itemprop="image" content='~/Images/Data/Posts/@Model.PostPicture' /> }           			
            <meta itemprop="url" content='@Url.Action("AphorismDetail", "Record", new { id = @Model.idBL })' />          
        </article>

a good mini guide from Google
In the process of searching, I came across an interesting plugin for WordPress - itemprop WP for SERP / SEO Rich snippets , it does the same thing for the site articles that I am now manually trying to do on a self-written site.
------------
Well, the aphorism got into the index, in the end I see something completely different from what was promised, but promised howling - beautiful, functional snippets ...
And I see this - take.ms/ yyFgQ
Aphorism - aforizmus.com/aphorism/1258
what's wrong?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vitaly Sorokin, 2015-01-15
@VitalySorokin

Micro-markup should not be created just for the sake of “micro-markup”, it should be tied to the structure of the html document, and use the data that is initially present in the design and layout. That is, you should not do additional markup for this.
And yes, the presence of all the attributes listed for the "article" schema is optional.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question