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 }}
|
||||
tags: []
|
||||
categories: []
|
||||
weight: 50
|
||||
show_comments: true
|
||||
draft: true
|
||||
---
|
||||
|
||||
|
|
|
@ -39,9 +39,8 @@
|
|||
{{ .Content }}
|
||||
</div>
|
||||
|
||||
{{ if in .Site.Params.mainSections .Type }}
|
||||
{{ with and .Site.Params.remark42 .Params.show_comments }}
|
||||
<hr />
|
||||
|
||||
{{ partial "comment.html" . }}
|
||||
{{ end }}
|
||||
</section>
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
<script>mermaid.initialize({ startOnLoad: true });</script>
|
||||
{{ end }}
|
||||
|
||||
{{ with .Site.Params.remark42 }}
|
||||
{{ with and .Site.Params.remark42 .Params.show_comments }}
|
||||
<script>
|
||||
var remark_config = {
|
||||
host: '{{ .host }}',
|
||||
|
|
Loading…
Reference in a new issue