Build your own Jekyll Blog

From Grundy
Revision as of 04:38, 11 July 2017 by Ishan (talk | contribs) (A step-by-step Tutorial to setup your own Jeykll Blog)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
Error creating thumbnail: File missing

Jekyll is a simple, static site builder. What it basically does is to convert a template directory containing folders and files in different format into a ready-to-publish website which can be easily hosted on servers. Due to the following features Jekyll is highly suggested for publishing blogs and simple sites

  • Ease of Setup
  • Requires no prerequisite knowledge of Web development like HTML, CSS, JS
  • Beautiful Templates available online

Note - Static websites have pages with fixed contents that is directly served from server's file directory to the user and hence are identical for everyone unlike dynamic websites which require web programming and database in the back-end and generate content by running a web-application for each user request.

Setting Up Jekyll

This section will be filled by Ashutosh

Creating your first Post

If you have successfully completed the above steps then you can open and modify your site locally. Execute the following on terminal

cd myblog

bundle exec jekyll serve _site

Error creating thumbnail: File missing

Just open your browser and go to http://127.0.0.1:4000/. Congrats ! That's your blog with a default post, you can now modify/add more posts.

Error creating thumbnail: File missing

Here's how your directory '/Documents/myblog' should look like

Error creating thumbnail: File missing


Steps:-

  1. Open folder _posts and create an empty document with the name YYYY-MM-DD-Post-Title.markdown. You have to be careful that the name matches the format or else Jekyll will not interpret it.
  2. Click on the file and modify its content. Now any markdown file is composed of two parts
    • Liquid Tags - Tags are specifics about the given post that are separately rendered by Jekyll. These include layout, ,title , date, type (If you plan on writing blog about multiple topics and want posts to appear separately in each section) etc. You can create your own tags too !
      ---
      layout: post
      title: "Second Post"
      date: 2017-07-11
      ---
    • Content - This include the rest of the content matter that is going to appear below the title. It can include text, images, links etc. Note that since this is markdown file, you must format content using markdown tags/syntax. For our post, I have added a sample .md file. For markdown syntax, Click Here.
  3. Reload the page and there you'll see your second post !

Modifying Layout

Using Templates

Many templates are already available online which can be directly used, I have listed some of them.

Error creating thumbnail: File missing



jekyllthemes.org
jekyllthemes.io
themes.jekyllrc.org

References

Official Jekyll Website