はしくれエンジニアもどきのメモ

情報系技術・哲学・デザインなどの勉強メモ・備忘録です。

schema.orgのArticleメモ

schema.orgのArticleメモ

schema.orgのArticleのメモ.あらゆる記事というものに使えるタイプ.

タイプ:Article

An article, such as a news article or piece of investigative report. (記事,ニューズ記事や調査報告書の一部のように.) Newspapers and magazines have articles of many different types and this is intended to cover them all. (新聞,マガジンは,多くの様々ななタイプの記事をもつ,このタイプ:Articleは,それらすべてをカバーすることを目標としています.)

Article - schema.org

Articleは,CreativeWorkを継承している(Thing > CreativeWork> WebSite).

  • Articleで追加されるプロパティは7つ.
    • CreativeWork:約82個
      • Thing:12個

CreativeWorkについては以下の記事でまとめた.

cartman0.hatenablog.com

Thingについては以下の記事にまとめた.

cartman0.hatenablog.com

プロパティ

  • [articleBody](http://schema.org/articleBody) :Text: The actual body of the article. 記事の実際のbody
  • [articleSection](http://schema.org/articleSection) :Text: Articles may belong to one or more 'sections' in a magazine or newspaper, such as Sports, Lifestyle, etc. (記事は,magazineや新聞において,「Sports」, 「Lifestyle」など,1つまたはそれ以上の`sections`に属するかもしれない)
  • [pageEnd](http://schema.org/pageEnd):Integer or Text: The page on which the work ends; for example "138" or "xvi".
  • [pageStart](http://schema.org/pageStart) Integer or Text: The page on which the work starts; for example "135" or "xiii".
  • [pagination](http://schema.org/pagination) :Text: Any description of pages that is not separated into pageStart and pageEnd; for example, "1-6, 9, 55" or "10-12, 46-49".
  • [speakable](https://pending.schema.org/speakable) :SpeakableSpecification or URL: Indicates sections of a Web page that are particularly 'speakable' in the sense of being highlighted as being especially appropriate for text-to-speech conversion. Other sections of a page may also be usefully spoken in particular circumstances; the 'speakable' property serves to indicate the parts most likely to be generally useful for speech. The speakable property can be repeated an arbitrary number of times, with three kinds of possible 'content-locator' values: - 1.) id-value URL references - uses id-value of an element in the page being annotated. The simplest use of speakable has (potentially relative) URL values, referencing identified sections of the document concerned. - 2.) CSS Selectors - addresses content in the annotated page, eg. via class attribute. Use the cssSelector property. - 3.) XPaths - addresses content via XPaths (assuming an XML view of the content). Use the xpath property. For more sophisticated markup of speakable sections beyond simple ID references, either CSS selectors or XPath expressions to pick out document section(s) as speakable. For this we define a supporting type, SpeakableSpecification which is defined to be a possible value of the speakable property.
  • [wordCount](http://schema.org/wordCount) :Integer: The number of words in the text of the Article. 文字数

GoogleでのArticleの取り扱い

「詳細な記事」機能

タイプArticleについて, Googleが推奨しているプロパティを設定しているとき, 「詳細な記事」という見出しの付いた検索結果が表示される場合がある.

例えば以下のように表示される場合がある.

https://developers.google.com/search/docs/data-types/images/articles01.png

Articles  |  Search  |  Google Developers

Googleでの必須・推奨プロパティ

  • 必須

    • author
    • datePublished
    • headline:(記事のタイトル)110文字まで
    • image
    • publisher
  • 推奨

    • dateModified
    • mainEntityOfPage

Google構造化データ テストツールでのタイプ:Articleのチェック

  • プロパティheadlineは110文字まで

headlineは110文字まで

JSON-LDでの指定例

<script type="application/ld+json">
{
    "@context":"http://schema.org",
    "@type":"Article",
    "headline":"記事タイトル", // 必須
    "author":{
        "@type":"Person",
        "address":"Japan",
        "email":"nabana.work@gmail.com",
        "name":"nabana",
        "image":"https://cdn1.www.st-hatena.com/users/ca/cartman0/profile.gif?1428245168"
    }, // 必須
    "publisher":{
        "@type":"Organization",
        "name":"組織名",
        "url":"http://organization.com/",
        "logo":{"
            @type":"ImageObject",
            "url":"http://organization.com/logo.png"
        }
    },// 必須
    "datePublished":"2017-11-05T16:31:07Z", // 必須
    "dateModified":"2017-11-06", // 推奨
    "mainEntityOfPage":{
    "@type":"WebPage",
    "@id":"http://example.com/articles/article1"
    } // 推奨,
    "name":"記事タイトル",
    "url":"http://example.com/articles/article1",
    "image":"http//exmaple.com/images/img.png", // 必須
    "fileFormat":"text/html",
    "isAccessibleForFree":true,
    "thumbnailUrl":"http//exmaple.com/images/img.png",
    "description":"description of article",
    "keywords":["keyword1","keyword2"],
    "encoding":{"@type":"MediaObject","encodingFormat":"utf-8"},
    "copyrightHolder":{
        "@type":"Person",
        "name":"名前",
        "address":"Japan",
        "email":"",
        "image":"https://cdn1.www.st-hatena.com/users/ca/cartman0/profile.gif?1428245168"
    },
    "copyrightYear":"2017"
}
</script>