mirror of
https://github.com/gohugoio/hugo.git
synced 2025-04-06 16:10:44 +00:00
docs: Use ToC length to pick the compact version
This commit is contained in:
parent
be82355570
commit
be72f234f8
5 changed files with 2 additions and 6 deletions
|
@ -1,7 +1,6 @@
|
||||||
---
|
---
|
||||||
date: 2014-05-14T02:36:37Z
|
date: 2014-05-14T02:36:37Z
|
||||||
toc: true
|
toc: true
|
||||||
tocstyle: compact
|
|
||||||
menu:
|
menu:
|
||||||
main:
|
main:
|
||||||
parent: extras
|
parent: extras
|
||||||
|
|
|
@ -10,7 +10,6 @@ prev: /extras/permalinks
|
||||||
title: Shortcodes
|
title: Shortcodes
|
||||||
weight: 80
|
weight: 80
|
||||||
toc: true
|
toc: true
|
||||||
tocstyle: compact
|
|
||||||
---
|
---
|
||||||
|
|
||||||
Hugo uses Markdown for its simple content format. However, there are a lot
|
Hugo uses Markdown for its simple content format. However, there are a lot
|
||||||
|
|
|
@ -3,7 +3,6 @@ author: "Michael Henderson"
|
||||||
date: 2014-09-28
|
date: 2014-09-28
|
||||||
linktitle: Creating a New Theme
|
linktitle: Creating a New Theme
|
||||||
toc: true
|
toc: true
|
||||||
tocstyle: compact
|
|
||||||
menu:
|
menu:
|
||||||
main:
|
main:
|
||||||
parent: tutorials
|
parent: tutorials
|
||||||
|
|
|
@ -2,7 +2,6 @@
|
||||||
date: 2014-03-10
|
date: 2014-03-10
|
||||||
linktitle: Migrating from Jekyll
|
linktitle: Migrating from Jekyll
|
||||||
toc: true
|
toc: true
|
||||||
tocstyle: compact
|
|
||||||
menu:
|
menu:
|
||||||
main:
|
main:
|
||||||
parent: tutorials
|
parent: tutorials
|
||||||
|
|
|
@ -3,8 +3,8 @@
|
||||||
<div class="col-lg-8 col-md-12">
|
<div class="col-lg-8 col-md-12">
|
||||||
{{ .Content }}
|
{{ .Content }}
|
||||||
</div>
|
</div>
|
||||||
<div id="toc" class="col-lg-offset-6 toc {{ with .Params.tocstyle }}{{ . }}{{ end }}">
|
<div id="toc" class="col-lg-offset-6 toc {{ if gt (len .TableOfContents) 2500 }}compact{{ end }}">
|
||||||
{{ .TableOfContents }}
|
{{ .TableOfContents }}
|
||||||
</div>
|
</div>
|
||||||
{{ else }}
|
{{ else }}
|
||||||
{{ .Content }}
|
{{ .Content }}
|
||||||
|
|
Loading…
Add table
Reference in a new issue