Complete Social Meta Tag (Updated) - HadaCircle

Kamis, Februari 02, 2017

Complete Social Meta Tag (Updated)

Menerapkan Complete Social Meta Tag (Updated) - Artikel pembaharuan dari artikel sebelumnya, kami akan membagikan Social Meta Tag Google+, Twitter dan Facebook dalam satu paket praktis, dimana terdapat beberapa tag yang sama antar sosial media yang bisa menyebabkan error jika dipasang bersamaan tanpa menghilangkan duplicat.

Tutorial Webmaster, Blogger

Complete Social Meta Tag (Updated)


Berikut, penerapan sebelum </head> dan jangan lupa hapus semua tag berfungsi serupa.
Pilih Salah Satu

Versi Mix (Twitter: CARDS, G+: Schema dan FB: Open Graph)

<!-- Twitter Summary Cards HadaCircle -->
<b:if cond='data:blog.pageType != "item"'>
<meta name="twitter:card" content="summary" />
<meta name="twitter:site" content="@hadacircle" />
<meta name="twitter:title" expr:content="data:blog.pageTitle" />
<meta name="twitter:description" expr:content="data:blog.metaDescription" />
  <meta name="twitter:image" content="/favicon.ico" />
</b:if>
<b:if cond='data:blog.pageType == "item"'>
<meta name="twitter:card" content="summary" />
<meta name="twitter:site" content="@hadacircle" />
<meta name="twitter:title" expr:content="data:post.title" />
<meta name="twitter:description" expr:content="data:post.labels + &quot; on &quot; + data:blog.title" />
  <meta name="twitter:image" expr:content="data:blog.postImageUrl" />
</b:if>
<!---->
 
 
<!-- Facebook Webmaster Sharing (Open Graph) HadaCircle -->
<b:if cond='data:blog.pageType != &quot;item&quot;'>
  <meta property="og:url"                expr:content="data:blog.canonicalHomepageUrl" />
<meta property="og:type"               content="article" />
<meta property="og:title"             expr:content="data:blog.pageTitle" /> />
<meta property="og:description"        expr:content="data:blog.metaDescription" />
  <meta property="og:image"              content="/favicon.ico" />
</b:if>
<b:if cond='data:blog.pageType == &quot;item&quot;'>
<meta property="og:url"                expr:content="data:blog.url" />
<meta property="og:type"               content="article" />
<meta property="og:title"              expr:content="data:post.title" /> />
<meta property="og:description"        expr:content="data:post.labels + &quot; on &quot; + data:blog.title" />
<meta property="og:image"              expr:content="data:blog.postImageUrl" />
</b:if>
<!---->
 
 
<!--Google Article Rendering HadaCircle -->
<b:if cond='data:blog.pageType != "item"'>
<meta itemscope="itemscope" itemtype="http://schema.org/Article" />
<meta itemprop="headline" expr:content="data:blog.pageTitle" />
<meta itemprop="description" expr:content="data:blog.metaDescription" />
<meta itemprop="image" content="/favicon.ico" />
</b:if>
<b:if cond='data:blog.pageType == "item"'>
<meta itemscope="itemscope" itemtype="http://schema.org/Article" />
<meta itemprop="headline" expr:content="data:post.title" />
<meta itemprop="description" expr:content="data:post.labels + &quot; on &quot; + data:blog.title" />
<meta itemprop="image" expr:content="data:blog.postImageUrl" />
</b:if>
<!---->  


Versi Mix Twitter: CARD dan Open Graph (Faebook+GooglePlus)

<!-- Twitter Summary Cards HadaCircle -->
<b:if cond='data:blog.pageType != "item"'>
<meta name="twitter:card" content="summary" />
<meta name="twitter:site" content="@hadacircle" />
<meta name="twitter:title" expr:content="data:blog.pageTitle" />
<meta name="twitter:description" expr:content="data:blog.metaDescription" />
  <meta name="twitter:image" content="/favicon.ico" />
</b:if>
<b:if cond='data:blog.pageType == "item"'>
<meta name="twitter:card" content="summary" />
<meta name="twitter:site" content="@hadacircle" />
<meta name="twitter:title" expr:content="data:post.title" />
<meta name="twitter:description" expr:content="data:post.labels + &quot; on &quot; + data:blog.title" />
  <meta name="twitter:image" expr:content="data:blog.postImageUrl" />
</b:if>
<!---->
 
 <!-- Facebook Webmaster Sharing (Open Graph) HadaCircle -->
<b:if cond='data:blog.pageType != &quot;item&quot;'>
  <meta property="og:url"                expr:content="data:blog.canonicalHomepageUrl" />
<meta property="og:type"               content="article" />
<meta property="og:title"             expr:content="data:blog.pageTitle" /> />
<meta property="og:description"        expr:content="data:blog.metaDescription" />
  <meta property="og:image"              content="/favicon.ico" />
</b:if>
<b:if cond='data:blog.pageType == &quot;item&quot;'>
<meta property="og:url"                expr:content="data:blog.url" />
<meta property="og:type"               content="article" />
<meta property="og:title"              expr:content="data:post.title" /> />
<meta property="og:description"        expr:content="data:post.labels + &quot; on &quot; + data:blog.title" />
<meta property="og:image"              expr:content="data:blog.postImageUrl" />
</b:if>
<!----> 

<!--Google Article Rendering HadaCircle -->
<b:if cond='data:blog.pageType != "item"'>
<meta itemprop="og:headline" expr:content="data:blog.pageTitle" />
</b:if>
<b:if cond='data:blog.pageType == "item"'>
<meta itemprop="og:headline" expr:content="data:post.title" />
</b:if>
<!----> 



Keterangan tag yang duplikat dan sudah dihilangkan

Duplicat

Simpan Template

Update: Gunakan kode yang lebih singkat dibawah ini (penggabungan tag kondisional, sedikit lebih singkat)



 
<!-- Complete Social Meta Tag (Updated) HadaCircle -->
<b:if cond='data:blog.pageType != "item"'>
<meta name="twitter:card" content="summary" />
<meta name="twitter:site" content="@hadacircle" />
<meta name="twitter:title" expr:content="data:blog.pageTitle" />
<meta name="twitter:description" expr:content="data:blog.metaDescription" />
  <meta name="twitter:image" content="/favicon.ico" />
<meta property="og:url"                expr:content="data:blog.canonicalHomepageUrl" />
<meta property="og:type"               content="article" />
<meta property="og:title"             expr:content="data:blog.pageTitle" /> />
<meta property="og:description"        expr:content="data:blog.metaDescription" />
  <meta property="og:image"              content="/favicon.ico" />
  <meta itemprop="og:headline" expr:content="data:blog.pageTitle" />

 </b:if>
<b:if cond='data:blog.pageType == "item"'>
<meta name="twitter:card" content="summary" />
<meta name="twitter:site" content="@hadacircle" />
<meta name="twitter:title" expr:content="data:post.title" />
<meta name="twitter:description" expr:content="data:post.labels + &quot; on &quot; + data:blog.title" />
  <meta name="twitter:image" expr:content="data:blog.postImageUrl" />
<meta property="og:url"                expr:content="data:blog.url" />
<meta property="og:type"               content="article" />
<meta property="og:title"              expr:content="data:post.title" /> />
<meta property="og:description"        expr:content="data:post.labels + &quot; on &quot; + data:blog.title" />
<meta property="og:image"              expr:content="data:blog.postImageUrl" /> 
<meta itemprop="og:headline" expr:content="data:post.title" /> 
</b:if>
<!---->
  

Simpan Tempate.
Comments


EmoticonEmoticon