Jekyll + Github
It has been 2 years since I stop wring my previous blog on tech, or more precise, programming because a hosting company delete my host before. So now, the end of the year 2014, I decided to restart my blog from scratch on Github Pages with Jekyll.
Seriously, this Jekyll is really useful. Just after 2 hours of work, I already have my base structure of the blog ready. If you guys want to pull the site, just go ahead and go to Github. Just remember to not include my posts on your websites.
I will soon write a blog post about this jekyll and how it is useful.
With the new version of HTML, now introduce lots of new tags like
<header>..., we are having a much more clear XML representation of website data than ever. I would like to focus on the following tags in this post on SEO:
<article> <header> <h1> My post </h1> <time>01-01-1997</time> </header> <section> <h1> Chapter 1</h1> <p>My beautiful text</p> </section> <footer></footer> </article>
<section> <h1> Category </h1> <article> <h1>Article 1</h1> </article> <article> <h1>Article 2</h1> </article> <article> <h1>Article 3</h1> </article> </section>
This tag by definition from w3 is a grouping of content. You can group different
section in an
article or multiple
article in a
section like category.
footer is a block, refer to the heading of a section or body, you can use multiple times but once per level.
We can use it to differentiate the heading or footer of a post and it's body. Refer to the first example above for the usage of header and footer.
You can use this tag for the page header and footer too just like I did (view source)
Main is the main content of the
<body>, it can only be use one, so pick carefully which part of data on your website you want to be the main. For example: a blogpost page main should contain it's articles.
Nav is anything that helps user navigate to different page on the website. Let it be the navbar of your page, the sidebar navigation, or pagination, wrap this tag around it.
I also recommend use a list inside nav. IMO, it's better for the robot to crawl than bunch of divs stack together.
Use the time on your article. Straight forward so the crawler don't need to guess.
Give the permalink on your post for consistency purpose.
Why H1? As of HTML5 we can have multiple H1 per document. H1 by default is the biggest heading for all sections, articles, footers, headers...
Schema.org is a markup volcabulary that helps search engines index easier the content of your website.
Let's improve the first example we have done above with schema.org included:
<article itemprop="blogPost" itemscope itemtype="http://schema.org/BlogPosting"> <header> <h1 itemprop="headline"> My post </h1> <time itemprop="datePublished" datetime="01-01-1997">01-01-1997</time> <link itemprop="url" href="/myblog/mypost/"> </header> <section itemprop="articleBody"> <h1> Chapter 1</h1> <p>My beautiful text</p> </section> <footer></footer> </article>
So an article is now identify as a
blogPost. Inside this
blogPost we have
url, and the
articleBody. Pretty straight forward, right? By structure your html like this. Google can easily find which part of your document is the article and which is the heading. And the benefit? SEO
Backward compatible? Internet Explorer?
IE8: Not Support IE9: Basic Support
My advice: Screw IE. Just kidding. You can use this script (html5shiv) for backward support on IE or browser not supporting these kind of tags