Jekyll and Engine Yard: A Match Made in The Clouds

  

Blogging is without a doubt the most important way to get your ideas out to the world, whether your personal take on a recently released album or your professional word on the latest updates to various products from your organization. While social media pushes our concepts out in small bursts, a blog is more of a time tested method for putting our thoughts on record for our users, our readers, and our customers to understand. A blog is still the non-ephemeral placeholder of concepts, and therefore remains a necessary for the modern company.

Luckily, there are many tools - and combinations of tools - that will help us get the job done. In this post we will look at three such tools: Jekyll, a blogging tool which can be deployed on Engine Yard to make hosting and releasing your blog posts easier. Jekyll is a static blog creator built in Ruby and will function as a place for our content, Ambassador is an API gateway built in Kubernetes using Envoy, and GKE is Google’s Kubernetes hosting service.

Jekyll is a static blog creator built in Ruby and will function as a place for our content. This tool can be used to generate many different types of static sites. Some companies have found uses for Jekyll in documentation sites and static landing pages. Today we’re going to talk about the most prominent use case, blogs.

There are many benefits to using Jekyll as opposed to other blog hosting services. For one, it’s easy to get started and to use. You can use tools like HTML/CSS or Markdown to generate static web pages that don’t require a database. Jekyll is also incredibly configurable using CSS and there are many sites that have pre-made themes (both paid and free).

Like everything else with Jekyll, installation is a breeze. To use Jekyll, we’ll need to install the jekyll gem using bundler. `jekyll new project-name` gives us a new blog to work with. And `jekyll serve` allows us to view changes locally via http://localhost:4000

To find more information on Jekyll including version requirements and how to install on different operating systems [check out the docs] https://jekyllrb.com/docs/installation/

Once you have the blog in place you’ll want to make it your own. The classic solution is to use your own CSS/SASS - and if you’re able to, great. If not, take a look at all the great plug and play templates available at Jekyllthemes.io.

Once you feel your site is exactly the way you like locally, it’s time to deploy. With Engine Yard, this is fairly easy. Making sure you’ve included Jekyll in your Gemfile (and we are using Bundler for this, of course) we will need to create a folder called deploy. This is where we will include our deploy hook, called after_bundle.rb letting the platform know we are setting up a Jekyll site.

if config.framework_env == 'staging'
run "cd #{config.release_path} && bundle exec jekyll build --destination 'public' --future --drafts"
else
run "cd #{config.release_path} && bundle exec jekyll build --destination 'public'"
end

With this file added, it’s just a matter of heading to your Engine Yard dashboard and clicking Deploy. Or if you’d prefer, you can use the CLI.

Here is the final result created for this post.

Conclusion

Jekyll is an easy way to get started with a blog or to add a blog to your current Ruby or Rails application. For more tips and tricks, check out the Jekyll cheat sheet.

Free Ebook: PaaS Is Dead

Platform as a Service (PaaS) is experiencing a digital transformation, and despite what some may argue, it’s far from dead. Learn why PaaS continues to prove it has a promising future for DevOps.

PaaS Is Dead

Related posts

RubyConf Round Up

November 27, 2018

The City: Los Angeles, California

Read More

It's Almost Time For Ruby Conf 2018!

November 6, 2018

It’s autumn and November is right around the corner! We all know what this means…

Read More

Take Out The Papers And The Trash

August 17, 2018

How to clean and clear large tables in MySQL

From time to time our data team gets requests for

Read More

Amanda Quaranto

Comments

Subscribe Here!