I'm a full-stack developer living in Boston, MA. I currently work at GitHub where I primarily write Ruby/Rails and a bit of TypeScript. I care a lot about building the right thing and writing great code.
I read Thoughtbot’s Style Sheet Swag quite a while ago but never really tried to implement it until a recent side project. As it turns out, this is much cleaner than using the asset pipeline.
Part 2 left off with our project having a post class that is able to parse YAML Front Matter from our Markdown files, and then process the Markdown as well. Now we need a way to have templates for our Posts as well as writing the files to our site directory.
Everyone has their favorite text editor and their own workflow to go along with it. In this post I’m going to go over how I use Vim and what my workflow consists of when working on a Rails project. It can be interesting to look into how others work with their tools and compare it to your own workflow.
In part 1 we set up our gem and a few dependencies and got our testing environment ready as well. Now it’s time to actually start writing our gem. We’ll start off with our Post class which when given a path will read the file, parse the YAML Front Matter and render our Markdown content.
If you’ve ever used Ruby you’d know that Gems are fundamental to any Ruby project. Despite Gems being so important it can be intimidating to write your own gem let alone how you should test them. This will take us through writing and testing a very basic static blog generator.