aboutsummaryrefslogtreecommitdiff
path: root/_plugins/toc.rb
diff options
context:
space:
mode:
authorLoek Le Blansch <loek@pipeframe.xyz>2025-01-24 18:36:15 +0100
committerLoek Le Blansch <loek@pipeframe.xyz>2025-01-24 18:36:15 +0100
commit1892bc38d8416a6ec79f37c41a9ffb38b6f44938 (patch)
treeffd211a1718ff2b793179c6fb115faf190e3cdfb /_plugins/toc.rb
parentbe6c61295058e32604e4d18da3689d2675e5bf19 (diff)
minimalize layout
Diffstat (limited to '_plugins/toc.rb')
-rw-r--r--_plugins/toc.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/_plugins/toc.rb b/_plugins/toc.rb
index 3c4f836..80acc82 100644
--- a/_plugins/toc.rb
+++ b/_plugins/toc.rb
@@ -9,7 +9,9 @@ module Jekyll
# enumerate over all h1-4 headings
@els = doc.css("h1, h2, h3, h4")
- return '<div class="chapterChildren">%s</div>' % [ output_toc ]
+ toc = output_toc()
+ return '' if toc.empty?
+ return '<aside id="toc" class="plainlink">%s</aside>' % [ toc ]
end
def output_toc
@@ -29,7 +31,7 @@ module Jekyll
if level >= level_next
output += '<li>'
else
- output += '<li class="stub"><details open>'
+ output += '<li class="stub"><details>'
output += '<summary>'
end