fix bug: default show comments. And allow a post or about page to disable comments, just edit front-matter in markdown file:

- disable disabledisqus: Add a line ` disabledisqus = "true" ` in front-matter

    For example:

    ```
    title = "How To Vertically Middle Align Floated Elements With Flexbox"
    description = "How To Vertically Middle Align Floated Elements With Flexbox"
    date = 2017-07-28T20:53:14+08:00
    tags = ["CSS"]
    categories = ["CSS"]
    draft = false
    disabledisqus = "true"
    ```

    The code of this feature will update in future, because the implementation is not so good.
feature/cover-image
nodejh 7 years ago
parent 8c47cc15b1
commit 22aa435ab3

@ -40,13 +40,13 @@
{{ end }}
{{ if .Site.Params.enableDisqus }}
{{ if eq .Params.disabledisqus "true" }}
{{ if ne .Params.disabledisqus "true" }}
{{ partial "disqus.html" . }}
{{ end }}
{{ end }}
{{ if .Site.Params.enableDuoshuo }}
{{ if eq .Params.disableduoshuo "true" }}
{{ if ne .Params.disableduoshuo "true" }}
{{ partial "duoshuo.html" . }}
{{ end }}
{{ end }}

@ -7,13 +7,13 @@
{{ .Content }}
{{ if .Site.Params.enableDisqus }}
{{ if eq .Params.disabledisqus "true" }}
{{ if ne .Params.disabledisqus "true" }}
{{ partial "disqus.html" . }}
{{ end }}
{{ end }}
{{ if .Site.Params.enableDuoshuo }}
{{ if eq .Params.disableduoshuo "true" }}
{{ if ne .Params.disableduoshuo "true" }}
{{ partial "duoshuo.html" . }}
{{ end }}
{{ end }}

Loading…
Cancel
Save