From 33d274a452f11eccc480f435205d4a30779cd92b Mon Sep 17 00:00:00 2001 From: Lorin Werthen Date: Thu, 2 Feb 2017 15:48:38 +0100 Subject: [PATCH] tocdepth, using css i guess --- content/assets/stylesheets/includes/blogpost.scss | 9 +++++++++ content/blog/16-17/linux.md | 2 ++ layouts/blogpost.md | 2 +- 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/content/assets/stylesheets/includes/blogpost.scss b/content/assets/stylesheets/includes/blogpost.scss index e97e42c..7b6da5d 100644 --- a/content/assets/stylesheets/includes/blogpost.scss +++ b/content/assets/stylesheets/includes/blogpost.scss @@ -7,6 +7,15 @@ } } +$sel: ''; +@for $i from 1 through 9 { + $sel: if($i == 1, "ul", selector-nest($sel, "ul")) !global; + + #markdown-toc.toc-depth-#{$i} #{$sel} { + display: none; + } +} + // Definition list is not defined in bulma dl { dt { diff --git a/content/blog/16-17/linux.md b/content/blog/16-17/linux.md index b9dfb92..71d804d 100644 --- a/content/blog/16-17/linux.md +++ b/content/blog/16-17/linux.md @@ -3,6 +3,8 @@ title: "Linux: hoe doe?" created_at: 02-02-2017 description: Uitleg en tips voor iedereen die linux wil installeren. author: Rien +toc: + depth: 1 --- _Tijdens het begin van ieder schooljaar komt er een verse lading studentjes Informatica toe die in de lessen Computergebruik kennis maken met de wondere wereld van GNU/Linux. Velen onder hen worden geprikkeld door de onontgonnen mysteries van dit besturingssysteem en groeien een verlangen om de kunst van het Unix-tovenaarschap zich eigen te maken._ diff --git a/layouts/blogpost.md b/layouts/blogpost.md index 9043051..0f06b28 100644 --- a/layouts/blogpost.md +++ b/layouts/blogpost.md @@ -4,7 +4,7 @@ Table of Contents

* x -{:toc} +{:toc .toc-depth-<%= item[:toc][:depth] %>} <% end %>