toggle comments at front matter
Whether the comment show up was determined by if the page is under mainSection, now it's determined by front matter and config.toml
This commit is contained in:
parent
836128c866
commit
e2ca0c5332
|
@ -3,6 +3,8 @@ title: "{{ replace .Name "-" " " | title }}"
|
||||||
date: {{ .Date }}
|
date: {{ .Date }}
|
||||||
tags: []
|
tags: []
|
||||||
categories: []
|
categories: []
|
||||||
|
weight: 50
|
||||||
|
show_comments: true
|
||||||
draft: true
|
draft: true
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|
|
@ -39,9 +39,8 @@
|
||||||
{{ .Content }}
|
{{ .Content }}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{ if in .Site.Params.mainSections .Type }}
|
{{ with and .Site.Params.remark42 .Params.show_comments }}
|
||||||
<hr />
|
<hr />
|
||||||
|
|
||||||
{{ partial "comment.html" . }}
|
{{ partial "comment.html" . }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</section>
|
</section>
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
<script>mermaid.initialize({ startOnLoad: true });</script>
|
<script>mermaid.initialize({ startOnLoad: true });</script>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
{{ with .Site.Params.remark42 }}
|
{{ with and .Site.Params.remark42 .Params.show_comments }}
|
||||||
<script>
|
<script>
|
||||||
var remark_config = {
|
var remark_config = {
|
||||||
host: '{{ .host }}',
|
host: '{{ .host }}',
|
||||||
|
|
Loading…
Reference in a new issue