optional table of contents

This commit is contained in:
Lorin Werthen 2016-10-31 12:29:44 +01:00
parent 508d4b1c2e
commit 97021d3d3a
No known key found for this signature in database
GPG key ID: F11FFC921E0E08E0
3 changed files with 9 additions and 4 deletions

3
Rules
View file

@ -106,9 +106,10 @@ end
# POSTS # POSTS
# #
compile '/posts/**/*' do compile '/posts/**/*' do
layout '/blogpost.md'
filter :kramdown filter :kramdown
layout '/blogpost.*' layout '/blogpost.erb'
layout '/generic.*' layout '/generic.*'
layout '/default.*' layout '/default.*'
end end

View file

@ -3,11 +3,9 @@ title: How do I browser?
description: Being a massive hipster, I tried out every obscure browser I could find. These are my opinions, for what it's worth. description: Being a massive hipster, I tried out every obscure browser I could find. These are my opinions, for what it's worth.
author: Lorin Werthen author: Lorin Werthen
created_at: 25-10-2016 created_at: 25-10-2016
toc: true
--- ---
* x
{:toc .is-pulled-right}
# Intro # Intro
It's 2016. We have hoverboards, selfie sticks, way too many JavaScript package managers and an obsession for ironic humor. In these dark days, we should search for those things that truly make us happy, like finding that near perfect web browser. It's 2016. We have hoverboards, selfie sticks, way too many JavaScript package managers and an obsession for ironic humor. In these dark days, we should search for those things that truly make us happy, like finding that near perfect web browser.

6
layouts/blogpost.md Normal file
View file

@ -0,0 +1,6 @@
<% if item[:toc] %>
* x
{:toc .is-pulled-right}
<% end %>
<%= yield %>