Rabu, 31 Agustus 2016

Meta Tag Pada Blogger

Meta Tag pada Blogger

Meta tag adalah pemberi informasi metadata mengenai situs tersebut kepada mesin telusur seperti Google atau Bing. Elemen meta ini harus diletakan pada bagian <head> dalam kode HTML.

Dan berikut adalah contoh meta tag pada halaman blog milik saya, yang telah saya optimalkan dari miliknya Kompi Ajaib, salah satunya adalah dengan penambahan prefix pada bagian <head> agar bisa dibaca oleh Open graph facebook dan meminimalisir kode errornya.

<head prefix='og: http://ogp.me/ns# fb: http://ogp.me/ns/fb# profile: http://ogp.me/ns/profile#'>
<meta charset='utf-8'/>
<meta content='width=device-width, initial-scale=1, maximum-scale=1' name='viewport'/>
<b:if cond='data:blog.pageType == &quot;index&quot;'>
<title><data:blog.pagetitle/>| Personal Blog</title>
<b:else/>
<b:if cond='data:blog.pageType != &quot;error_page&quot;'>
<title><data:blog.pagename/> ~ <data:blog.title/></title>
<b:else/>
<title>404 ~ Page Not Found!</title>
</b:if>
</b:if>
<meta content='text/html; charset=UTF-8' http-equiv='Content-Type'/>
<meta content='blogger' name='generator'/>
<link expr:href='data:blog.homepageUrl + &quot;favicon.ico&quot;' rel='icon' type='image/x-icon'/>
<link expr:href='data:blog.url' rel='canonical'/>
<link expr:href='data:blog.homepageUrl + &quot;feeds/posts/default&quot;' expr:title='data:blog.title + &quot; - Atom&quot;' rel='alternate' type='application/atom+xml'/>
<link expr:href='data:blog.homepageUrl + &quot;feeds/posts/default?alt=rss&quot;' expr:title='data:blog.title + &quot; - RSS&quot;' rel='alternate' type='application/rss+xml'/>
<link expr:href='&quot;http://www.blogger.com/feeds/&quot; + data:blog.blogId + &quot;/posts/default&quot;' expr:title='data:blog.title + &quot; - Atom&quot;' rel='alternate' type='application/atom+xml'/>
<link href='http://www.blogger.com/openid-server.g' rel='openid.server'/>
<link expr:href='data:blog.homepageUrl' rel='openid.delegate'/>
<b:if cond='data:blog.pageType == &quot;item&quot;'>
<b:if cond='data:blog.postImageThumbnailUrl'>
<link expr:href='data:blog.postImageThumbnailUrl' rel='image_src'/>
</b:if>
</b:if>
<b:if cond='data:blog.pageType == &quot;item&quot;'>
<meta expr:content='data:blog.pageName' property='og:title'/>
<meta expr:content='data:blog.canonicalUrl' property='og:url'/>
<meta content='article' property='og:type'/>
<b:if cond='data:blog.metaDescription'>
<meta expr:content='data:blog.metaDescription' property='og:description'/>
<b:else/>
<meta expr:content='&quot;Silahkan baca artikel &quot; + data:blog.pageName + &quot; ini selengkapnya di &quot; + data:blog.title + &quot;&quot;' property='og:description'/>
</b:if>
</b:if>
<meta expr:content='data:blog.title' property='og:site_name'/>
<b:if cond='data:blog.url == data:blog.homepageUrl'>
<meta expr:content='data:blog.title' property='og:title'/>
<meta content='website' property='og:type'/>
<b:if cond='data:blog.metaDescription'>
<meta expr:content='data:blog.metaDescription' property='og:description'/>
<b:else/>
<meta expr:content='&quot;Silahkan kunjungi &quot; + data:blog.pageTitle + &quot;Untuk membaca postingan-postingan menarik.&quot;' property='og:description'/>
</b:if>
</b:if>
<b:if cond='data:blog.postImageUrl'>
<meta expr:content='data:blog.postImageUrl' property='og:image'/>
<b:else/>
<b:if cond='data:blog.postImageThumbnailUrl'>
<meta expr:content='data:blog.postThumbnailUrl' property='og:image'/>
<b:else/>
<meta content='#####' property='og:image'/>
</b:if>
</b:if>
<meta content='#####' property='fb:admins'/>
<meta content='#####' property='fb:profile_id'/>
<meta content='#####' property='fb:app_id'/>
<meta content='https://www.facebook.com/#####' property='article:author'/>
<link href='https://plus.google.com/+#####' rel='author'/>
<link href='https://plus.google.com/+#####' rel='publisher'/>
<meta content='#####' name='Author'/>
<meta expr:content='data:blog.title' name='twitter:site'/>
<meta content='summary_large_image' name='twitter:card'/>
<meta content='@#####' name='twitter:creator'/>
<meta content='#####' name='google-site-verification'/>
<meta content='#####' name='msvalidate.01'/>
<meta content='#####' name='alexaVerifyID'/> 
Perhatikan tanda ##### dan harap disesuaikan dengan blog/keinginan kalian.
Share:

Iqbar Alhakim

IT Analyst and Web Developer

"I am an IT Analyst, writer, and web developer at Freelancer currently living in Tasikmalaya, Indonesia. My interests range from technology to coffee. I am also interested in Hacking, arts, and music."

"To be or not to be, this is my awesome motto!"

Job Description

Freelancer, Web developer, Design graphic, and coffee addict.

235

Followers

114

Following

35

Projects