What on earth is Jekyll?
It’s a cheeky little tool to create static websites.
What’s a static website?
Well if you’ve ever built a website, you probably started by simply creating one file, an HTML document. Then maybe you added a CSS file and eventually some JS. Then Wordpress and Joomla etc came along and they were so powerful they were the natural progression but things just seem to have got a bit bogged down. And so now we seem to have done a complete loop and we’re creating the simple sites again. No need for the pain that is databases, no need for any PHP or server side scripting. Good old fashioned web dev!
More about Jekyll
OK, so you still gotta do a bit of command line business. This always puts me off as I like to see exactly what I’m downloading but fear not, once you’ve installed it you won’t need it again. Follow the instructions on the Jekyll docs to install.
What you should eventually have is a few folders that should look fairly familiar. Styles in Sass, pages, posts, layouts.
To add new posts, simply add a file in the _posts
directory that follows the convention YYYY-MM-DD-name-of-post.ext
and includes the necessary front matter. Take a look at the source for this post to get an idea about how it works.
Jekyll also offers powerful support for code snippets:
def print_hi(name)
puts "Hi, #{name}"
end
print_hi('Tom')
#=> prints 'Hi, Tom' to STDOUT.
Check out the Jekyll docs for more info on how to get the most out of Jekyll. File all bugs/feature requests at Jekyll’s GitHub repo. If you have questions, you can ask them on Jekyll’s dedicated Help repository.
Comments