ThichCode.NET: Meta for blogspot ThichCode.NET: Meta for blogspot
ThichCode.NET

My blog

articles about technology, tricks, programming, ... from practical experience.
Meta for blogspot

Meta for blogspot

Meta tags are snippets of text that describe a page’s content; the meta tags don’t appear on the page itself, but only in the page’s code. We all know tags from blog culture, and meta tags are more or less the same thing, little content descriptors that help tell search engines what a web page is about.

Meta tags are snippets of text that describe a page’s content; the meta tags don’t appear on the page itself, but only in the page’s code. We all know tags from blog culture, and meta tags are more or less the same thing, little content descriptors that help tell search engines what a web page is about.



The “meta” stands for “metadata,” which is the kind of data these tags provide – data about the data on your page. You can insert into <head></head>
Tip : Make sure your meta keywords match the content of your blog for best search engine performance.
Warning : Search engines place only a limited amount of importance on meta tags, with the actual content of your blog having a bigger impact on where it will appear in results pages.
<!-- set caching file -->
<include path='/assets/**.css' expiration='7d'/>
<include path='/assets/**.js' expiration='7d'/>
<include path='/assets/**.gif' expiration='7d'/>
<include path='/assets/**.jpg' expiration='7d'/>
<include path='/assets/**.jpeg' expiration='7d'/>
<include path='/assets/**.png' expiration='7d'/>

<!-- Allow run responsive on mobile --> <meta content='width=device-width,initial-scale=1.0' name='viewport'/> 

<!-- Unicode for website -->
<meta content='text/html; charset=utf-8' http-equiv='Content-Type'/>

<!-- Name website -->
<meta expr:content='data:blog.title' property='og:site_name'/>

<!-- Author website -->
<meta content='ThichCode.NET' name='author'/>
<meta content='ThichCode.NET' name='og:author'/>

<!-- Location -->
<meta content='en_US' property='og:locale'/>

<!-- BlogID : only blogspot -->
<meta expr:content='data:blog.blogId' itemprop='blogId'/>

<!-- PostID : only blogspot -->
<meta expr:content='data:post.id' itemprop='postId'/>

<!-- set search engine -->
<meta content='index, follow' name='Robots'/>

<!-- Meta on page item -->
<b:if cond='data:blog.pageType == "item"'>
<!-- title -->
<title><data:blog.pageTitle/></title>
    <meta expr:content='data:blog.pageName' property='og:title'/>

<!-- Link current -->
    <meta expr:content='data:blog.canonicalUrl' property='og:url'/>

<!-- type is article on page item -->
    <meta content='article' property='og:type'/>

<!-- set keywords search -->
<meta expr:content='data:blog.pageName' name='keywords'/>

<!-- check is metadescription [description for website] -->
    <b:if cond='data:blog.metaDescription'>
        <meta expr:content='data:blog.metaDescription' property='og:description'/>
<meta expr:content='data:blog.metaDescription' itemprop='description'/>
    <b:else/>
        <meta expr:content='data:blog.pageName' property='og:description'/>
<meta expr:content='data:blog.pageName' itemprop='description'/>
    </b:if>
<b:else/>
<!-- Meta for homepage -->
<b:if cond='data:blog.url == data:blog.homepageUrl'>

<!-- keyword for hompage -->
<meta content='thichcode.NET, C#, javascript, template for blogspot, tools' name='keywords'/>

<!-- title -->
<title><data:blog.title/></title>

<!-- link homepage -->
<meta expr:content='data:blog.homepageUrl' property='og:url'/>

<!-- title -->
<meta expr:content='data:blog.title' property='og:title'/>

<!-- type : website -->
<meta content='website' property='og:type'/>

<!-- check metaDescription and show it -->
<b:if cond='data:blog.metaDescription'>
<meta expr:content='data:blog.metaDescription' name='Description'/>
<meta expr:content='data:blog.metaDescription' property='og:description'/>
<b:else/>
<meta expr:content='&quot;Visit &quot; + data:blog.pageTitle + &quot; To read more cool stuff.&quot;' property='og:description'/>
</b:if>
<b:else/>
<!-- Meta for static_page and index -->
<!-- title -->
<title><data:blog.title/></title>
<meta expr:content='data:blog.title' property='og:title'/>

<!-- type : website -->
<meta content='website' property='og:type'/>
</b:if>
</b:if>

<!-- Set image for share on Facebook or other -->
<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/>
<!-- if no image set image defaultt -->
        <meta content='https://lh3.googleusercontent.com/-qiqL5GizsuY/Vi77FWiDNhI/AAAAAAAAGsQ/JHiZJFJp1Xsel1K_hmowkQxK-0syoMEkwCCo/s512-Ic42/myAvartar.jpg' property='og:image'/>
    </b:if>
</b:if>

<!-- Meta for Id application facebook -->
<meta content='247905662012629' property='fb:app_id'/>
<meta content='YOU FB ID' property='fb:admins'/>
<meta content='YOUR PAGE ID' property='fb:profile_id'/>

<!-- Meta for twitter -->
<meta expr:content='data:blog.title' name='twitter:site'/>
<meta content='summary_large_image' name='twitter:card'/>
<meta content='@YOUR TWITTER USERNAME' name='twitter:creator'/>

Post a Comment

Most read

Latest