I use jekyll code highlight
with gem rouge
.
Templates - Jekyll • Simple, blog-aware, static sites
Code (index.html)
---
layout: default
---
<div class="container-fluid">
<div class="row">
<div class="col-sm-2" style="background-color:red;">
{% highlight ruby %}
def hoge
puts 'red'
end
{% endhighlight %}
</div>
<div class="col-sm-8" style="background-color:blue;">
{% highlight ruby %}
def foo
puts 'blue'
end
{% endhighlight %}
</div>
<div class="col-sm-2" style="background-color:yellow;">
{% highlight ruby %}
def bar
puts 'yellow'
end
{% endhighlight %}
</div>
</div>
</div>
Result
Commit
https://github.com/shingo-nakanishi/jekyll-dojo/tree/ca564cd5653e7ee028cd30b87c04a6076f078693
Point
{% highlight ruby %}
def bar
puts 'yellow'
end
{% endhighlight %}
is the unnecessary indent was gone. but unreadable html code. the unnecessary break line not gone.
How to remove them?