Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-docs.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/Rules
diff options
context:
space:
mode:
authorConnor Shea <connor.james.shea@gmail.com>2016-11-17 02:49:09 +0300
committerConnor Shea <connor.james.shea@gmail.com>2016-11-17 02:49:09 +0300
commitb872e678ddf2998c0d6da50460b3c03d332414fc (patch)
tree830c7ba084b6228f750a79bb33552098b2467fc6 /Rules
parent02f3c9d039451d1099935cbfd0c6b6c158db554b (diff)
Add a Table of Contents. Fix #39.
Diffstat (limited to 'Rules')
-rw-r--r--Rules7
1 files changed, 5 insertions, 2 deletions
diff --git a/Rules b/Rules
index 28d204f8..1ac2d72c 100644
--- a/Rules
+++ b/Rules
@@ -30,6 +30,8 @@ end
compile '/**/*.md' do
if item[:redirect].nil?
+ include_toc = item.identifier.to_s.end_with?("README.md") ? false : true
+
# Use Redcarpet with Rouge.
filter :redcarpet,
renderer: HTML,
@@ -42,11 +44,12 @@ compile '/**/*.md' do
strikethrough: true,
superscript: true,
tables: true,
- autolink: true
+ autolink: true,
},
renderer_options: {
with_toc_data: true
- }
+ },
+ with_toc: include_toc
layout '/default.*'