add disableComments option #147

This commit is contained in:
Dmitry Kolosov 2022-04-12 20:11:58 +03:00
parent c4665390d2
commit ae6b41de47
3 changed files with 20 additions and 15 deletions

View File

@ -233,6 +233,9 @@ Enabled by `paginationSinglePost` param in `params` section of config.
To provide webmention support you can **either** specify your webmention.io username with `login: webmentionusername` **or** specify a link to your custom webmention endpoint with `url: https://yourdomain.com/webemntions/receive`.
If you use webmention.io you can also enable pingback with `pingback: true`
### Disabling comments per-page basis
Add `disableComments: true` to post front matter.
## Contributing
If you find a bug or have an idea for a feature, feel free to write an [issue](https://github.com/mitrichius/hugo-theme-anubis/issues) or make a PR.

View File

@ -37,20 +37,7 @@
{{ partial "post-pagination.html" . }}
{{ end }}
{{ if .Site.DisqusShortname }}
{{ partial "disqus.html" . }}
{{ if not .Params.disableComments }}
{{ partial "comments.html" . }}
{{ end }}
{{ if .Site.Params.UtterancesRepo }}
{{ partial "utterances.html" . }}
{{ end }}
{{ if .Site.Params.isso.enabled }}
{{ partial "isso.html" . }}
{{ end }}
{{ if .Site.Params.graphcommentId }}
{{ partial "graphcomment.html" . }}
{{ end }}
{{ end }}

View File

@ -0,0 +1,15 @@
{{ if .Site.DisqusShortname }}
{{ partial "disqus.html" . }}
{{ end }}
{{ if .Site.Params.UtterancesRepo }}
{{ partial "utterances.html" . }}
{{ end }}
{{ if .Site.Params.isso.enabled }}
{{ partial "isso.html" . }}
{{ end }}
{{ if .Site.Params.graphcommentId }}
{{ partial "graphcomment.html" . }}
{{ end }}