projects
/
brevno-suite
/
hugo
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
be82355
)
docs: Use ToC length to pick the compact version
author
bep
<bjorn.erik.pedersen@gmail.com>
Mon, 11 May 2015 20:23:35 +0000
(22:23 +0200)
committer
bep
<bjorn.erik.pedersen@gmail.com>
Mon, 11 May 2015 20:23:35 +0000
(22:23 +0200)
docs/content/extras/menus.md
patch
|
blob
|
history
docs/content/extras/shortcodes.md
patch
|
blob
|
history
docs/content/tutorials/creating-a-new-theme.md
patch
|
blob
|
history
docs/content/tutorials/migrate-from-jekyll.md
patch
|
blob
|
history
docs/layouts/_default/single.html
patch
|
blob
|
history
diff --git
a/docs/content/extras/menus.md
b/docs/content/extras/menus.md
index 05d40e5f9c9a4b1cbad2ef02b476f3436d168e8a..9daaff609e677fff8a527129c32f3d6f78b945d5 100644
(file)
--- a/
docs/content/extras/menus.md
+++ b/
docs/content/extras/menus.md
@@
-1,7
+1,6
@@
---
date: 2014-05-14T02:36:37Z
toc: true
-tocstyle: compact
menu:
main:
parent: extras
diff --git
a/docs/content/extras/shortcodes.md
b/docs/content/extras/shortcodes.md
index 790fba970af4c41ddf113c3c786e5e4cf08385aa..4ef7ec81ffb5ba2650f6b9e2126f46cb49b01c59 100644
(file)
--- a/
docs/content/extras/shortcodes.md
+++ b/
docs/content/extras/shortcodes.md
@@
-10,7
+10,6
@@
prev: /extras/permalinks
title: Shortcodes
weight: 80
toc: true
-tocstyle: compact
---
Hugo uses Markdown for its simple content format. However, there are a lot
diff --git
a/docs/content/tutorials/creating-a-new-theme.md
b/docs/content/tutorials/creating-a-new-theme.md
index 4113636ade90a6075e4e2ac12ba1a62f253361e1..6dcc16bedc84b6e5ba312aadcb6ded8d694bb485 100644
(file)
--- a/
docs/content/tutorials/creating-a-new-theme.md
+++ b/
docs/content/tutorials/creating-a-new-theme.md
@@
-3,7
+3,6
@@
author: "Michael Henderson"
date: 2014-09-28
linktitle: Creating a New Theme
toc: true
-tocstyle: compact
menu:
main:
parent: tutorials
diff --git
a/docs/content/tutorials/migrate-from-jekyll.md
b/docs/content/tutorials/migrate-from-jekyll.md
index 1dd5fd324d18d7790bb4b0aa38d2bb9583e4f648..d5975de8f17d2b7c9b30f9a9a7396d27b724c2a5 100644
(file)
--- a/
docs/content/tutorials/migrate-from-jekyll.md
+++ b/
docs/content/tutorials/migrate-from-jekyll.md
@@
-2,7
+2,6
@@
date: 2014-03-10
linktitle: Migrating from Jekyll
toc: true
-tocstyle: compact
menu:
main:
parent: tutorials
diff --git
a/docs/layouts/_default/single.html
b/docs/layouts/_default/single.html
index 864b37b8e5eb1641bb344b92ba556c15cb104d04..702014061e28b2fdd96643d71d4730fe76d9e49c 100644
(file)
--- a/
docs/layouts/_default/single.html
+++ b/
docs/layouts/_default/single.html
@@
-3,8
+3,8
@@
<div class="col-lg-8 col-md-12">
{{ .Content }}
</div>
-<div id="toc" class="col-lg-offset-6 toc {{
with .Params.tocstyle }}{{ . }}
{{ end }}">
-{{ .TableOfContents }}
+<div id="toc" class="col-lg-offset-6 toc {{
if gt (len .TableOfContents) 2500 }}compact
{{ end }}">
+
{{ .TableOfContents }}
</div>
{{ else }}
{{ .Content }}