Search

Home » , » Memasang Schema Structured Data Untuk Blog Informasi (Newsarticle)

Memasang Schema Structured Data Untuk Blog Informasi (Newsarticle)

Memasang Schema Structured Data untuk Blog Berita  Memasang Schema Structured Data untuk Blog Berita (NewsArticle)
Salah satu klien schema structured data templatenya dikenali sebagai blog berita atau situs informasi (news site) oleh Google.

Semula, schema-nya memakai blog sebab memang dibentuk dengan Blogger, yaitu schema.org/Blog.

Karena kontennya berupa informasi (news), CB ganti saja schemanya dengan memasangkan schema gres berupa Schema NewsArticle.

Menurut laman resmi schema:  "A NewsArticle is an article whose content reports news, or provides background context and supporting materials for understanding the news."

Memasang Schema Structured Data untuk Blog Berita (NewsArticle)

1. Tema > Edit HTML
2. Ubah instruksi pembuka <html> di penggalan atas instruksi dengan instruksi berikut ini:

<HTML dir='ltr' itemscope='' itemtype='http://schema.org/NewsArticle' lang='id'>

atau dapat juga dengan mengganti kode  <div id='content-wrapper'> dan semisalnya dengan instruksi berikut ini:

  <div id='content-wrapper' itemscope='' itemtype='http://schema.org/NewsArticle' role='main'>

3. Save!

Jika mengalami error di structured data testing tools, mulai dari missing image, author, published, dan sebagainya, lanjutkan dengan langkah berikut ini.

4. Simpan instruksi berikut ini di bawah kode: <b:includable id='post' var='post'>

<div itemprop='image' itemscope='itemscope' itemtype='https://schema.org/ImageObject'> <b:if cond='data:post.firstImageUrl'> <img expr:src='data:post.firstImageUrl' style='display:none;'/> <meta expr:content='data:post.firstImageUrl' itemprop='url'/> </b:if> <meta content='800' itemprop='width'/> <meta content='800' itemprop='height'/> </div>
<div itemprop='publisher' itemscope='itemscope' itemtype='https://schema.org/Organization'>
<div itemprop='logo' itemscope='itemscope' itemtype='https://schema.org/ImageObject'>
<img alt='logo' src='URL LOGO ANDA' style='display:none;'/>
<meta alt='logo' content='URL LOGO ANDA' itemprop='url'/>
<meta content='600' itemprop='width'/>
<meta content='60' itemprop='height'/>
</div>
<meta expr:content='data:blog.title' itemprop='name'/>
</div>
<span class='fn' itemprop='author' itemscope='itemscope' itemtype='http://schema.org/Person'>
  <meta expr:content='data:post.author' itemprop='name'/>
</span>

5. Simpan instruksi berikut ini di bawah kode: <div class='post hentry'> atau semisalnya.

<meta expr:content='data:post.timestamp' itemprop='datePublished'/>
<meta expr:content='data:post.lastUpdatedISO8601' itemprop='dateModified'/>
<meta expr:itemid='data:post.link ? data:post.link : data:post.url' itemType='https://schema.org/WebPage' itemprop='mainEntityOfPage' itemscope='itemscope'/>

6. Tambahkan instruksi itemprop='headline' di belakang instruksi judul postingan menyerupai ini:

<h2 class='post-title entry-title' itemprop='headline'>
<h1 class='post-title entry-title' itemprop='headline'>

7. Save! Simpan template.

Hasilnya

Memasang Schema Structured Data untuk Blog Berita  Memasang Schema Structured Data untuk Blog Berita (NewsArticle)

Cara Lain Pasang Schema Blog Berita (NewsArticle) Recommended!

Cara lain memasang schema untuk blog informasi atau blog dengan konten artikel informasi ialah sebagai berikut.

1. Tema > Edit HTML
2. Simpan instruksi nomor 3 berikut ini di bawah kode:

<b:includable id='post' var='post'> <div class='post hentry uncustomized-post-template' itemprop='blogPost' itemscope='itemscope' itemtype='http://schema.org/BlogPosting'>

atau di bawah kode:

 <b:includable id='post' var='post'>
<article class='post hentry' itemscope='itemscope' itemtype='http://schema.org/Blog'>

3.  Ini kodenya:
<script type='application/ld+json'>
{
  "@context": "http://schema.org",
  "@type": "NewsArticle",
  "mainEntityOfPage": {
    "@type": "WebPage",
    "@id": "<data:post.title/>"
  },
  "headline": "Article headline",
  "image": {
    "@type": "ImageObject",
    "url": "<data:post.firstImageUrl/>",
    "height": 800,
    "width": 800
  },
  "datePublished": "<data:post.timestampISO8601/>",
  "dateModified": "<data:post.timestampISO8601/>",
  "author": {
    "@type": "Person",
    "name": "<data:post.author/>"
  },
   "publisher": {
    "@type": "Organization",
    "name": "<data:blog.title/>",
    "logo": {
      "@type": "ImageObject",
      "url": "URL GAMBAR LOGO",
      "width": 600,
      "height": 60
    }
  },
  "description": "<data:post.snippet/>"
}
</script>

4. Save!

Demikian Memasang Schema Structured Data untuk Blog Berita (NewsArticle). Lengkapi dengan mendaftarkan blog informasi Anda ke Google News (Google Berita).

Pastikan juga blog informasi Anda memakai template blog news style menyerupai detikStyle atau CNN Style. Cek di Galeri Template.



0 comments:

Post a Comment

Powered by Blogger.