Patching plugins can make upgrades difficult (if you want to to upgrade
Octopress at all). It is not required and you can skip this step and go
straight to
the next part of this guide.
If you don't know how diff(1) and
patch(1) works, it is probably better that you avoid
patching at all.
Introduction
There are a few parts where we can improve Bootstrap’s integration into
Octopress. I wish there was another way than patching the plugins, but it is
the only way as long as they output markup and don’t delegate formatting to the
theme.
Theses patches were tested against the latest version of Octopress
master's branch at the time of writting (23 Jan 2015):
commit 5080107cb9e4c7bad8feb719f7e57c1da3b20c65
Use Bootstrap's panels for code
Both the codeblock and include_code liquid tags have been styled in this
theme so their header looks a lot like Bootstrap’s
panels. However, they don’t
actually output Bootstrap’s classes. The default is fine as long as you’re using
the default Bootstrap theme (as this blog) or no theme at all. Here are the two
versions (check the markup):
not patched:
fancy title
1
10.times{print"Hello World !"}
patched:
fancy title
1
10.times{print"Hello World !"}
If you want to use another boostrap theme than the default theme, it would be
better to have theses plugins output the Bootstrap’s panel classes so they
can be style by your theme. Here are two patches, the first is for the
code_block plugin and the second for the include_code plugin.
This patch will improve how categories are displayed (at the end of a post and
in the Archives page). By default, Octopress output the categories as a list of
links separated by commas, for example: