commit
cbc21e8492
3 changed files with 16 additions and 10 deletions
|
@ -83,6 +83,8 @@ __`Hyde-hyde`__ essentially inherits most of Hyde's [options](https://github.com
|
|||
...
|
||||
```
|
||||
|
||||
* `include_toc = false`: Setting to `false` in FrontMatter will disable too short TOC data as your want.
|
||||
|
||||
* Per PR [#56](https://github.com/htr3n/hyde-hyde/commit/5ed13e17400bbc09a342b60fd50cd9fe3e6f1525), Gravatar pics can be used exclusively to `.Site.Params.authorimage` via the parameter `.Site.Params.social.gravatar`
|
||||
|
||||
* ```toml
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
{{ $include_toc := .Params.include_toc}}
|
||||
<article>
|
||||
<header>
|
||||
<h1>{{ .Title }}</h1>
|
||||
|
@ -10,6 +11,7 @@
|
|||
</header>
|
||||
{{ $tableOfContents := .TableOfContents }}
|
||||
{{ with .Site.Params.toc }}
|
||||
{{ if ne $include_toc false }}
|
||||
<div class="toc-wrapper">
|
||||
<input type="checkbox" id="tocToggle">
|
||||
<label for="tocToggle">Table of Content</label>
|
||||
|
@ -20,6 +22,7 @@
|
|||
{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
<div class="post">
|
||||
{{ .Content }}
|
||||
</div>
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
{{ $include_toc := .Params.include_toc}}
|
||||
{{ if .Site.GoogleAnalytics }}
|
||||
<!-- Google Analytics -->
|
||||
{{ template "_internal/google_analytics_async.html" . }}
|
||||
|
@ -5,7 +6,7 @@
|
|||
{{ partial "footer/font-awesome-js.html" . }}
|
||||
{{ partial "highlight-js.html" . }}
|
||||
{{ with .Site.Params.toc }}
|
||||
{{ if eq . "tocbot" }}
|
||||
{{ if and (eq . "tocbot") (ne $include_toc false) }}
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/tocbot/4.4.2/tocbot.js"></script>
|
||||
<script type="text/javascript">
|
||||
if (tocbot) {
|
||||
|
|
Loading…
Reference in a new issue