From bcf85c2a50326dd3e54df223a2494dcc4f83eab5 Mon Sep 17 00:00:00 2001 From: uce Date: Thu, 31 Jul 2014 15:22:10 +0200 Subject: [PATCH] [Docs] Limit nesting of generated TOCs The jekyll tocify plugin generates an HTML TOC based on the headings of the markdown files. This commit limits the nesting of the TOC to 2, which means that only h1 and h2 element will be taken into account. Previously, all heading elements were used, which resulted in a very cluttered TOC. --- docs/_plugins/tocify.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/_plugins/tocify.rb b/docs/_plugins/tocify.rb index 7df0c3d6343..9eb62938568 100644 --- a/docs/_plugins/tocify.rb +++ b/docs/_plugins/tocify.rb @@ -1,7 +1,7 @@ module Jekyll module Tocify def tocify(input) - converter = Redcarpet::Markdown.new(Redcarpet::Render::HTML_TOC) + converter = Redcarpet::Markdown.new(Redcarpet::Render::HTML_TOC.new(nesting_level: 2)) converter.render(input) end end -- GitLab