Making a Static Website using jekyll.
gem install bundler jekyll
jekyll new projectname
for first time starting the server
bundle exec jekyll serve
Otherwise just use
jekyll serve
More blog can be added by adding .md fies to the 'posts' folder.
Add another folder namely 'drafts'.To this folder you can add important documents which you don't want display on the website.
Adding other sections like 'Abouts' ection. Add these kind of sections by directly adding markdown files to the main folder.
By using permalink attribute you can assign a URL to any page as of your own choice.
Jekyll uses 'minima' as a default theme. You can find different themes on https://rubygems.org/ Take the name of the theme which you want to install and add it to the 'Gemfile' inside the main folder.
gem "ThemeName"
bundle install
bundle exec jekyll server
It's happening because in our new theme, it doesn't contains layouts like 'page','home' & 'post'. So go to your theme's github repository and checkout the layouts folder. Change the layouts in the our websites folder. It's amazing!
You can also add a "layout" folder if you want to customize your websites layout. Add html file inside the folder and specify the file's name in each markdown file's layout section.
Make a new folder for includes and store the html files in it. let say we want to include header of our website from 'header.html' on a another html file you have to write
{{% include header.html %}}
Make a ' data' folder inside the main folder. This folder contains 3 types of data files .yml,.json & .csv format files to store the data.
Change the directory that contains the Gem file. Run in terminal
jekyll serve