mirror of
https://github.com/gcushen/hugo-academic.git
synced 2025-07-26 19:15:16 +02:00
fix: if comment count enabled, show only on supported pages
Don't attempt to show Disqus comment count on page types that do not have corresponding Disqus comment block. Currently, just Post and Page types support commenting. See #1206
This commit is contained in:
parent
64cceae099
commit
ac23dc1b92
1 changed files with 1 additions and 1 deletions
|
@ -49,7 +49,7 @@
|
|||
</span>
|
||||
{{ end }}
|
||||
|
||||
{{ $comments_enabled := and site.DisqusShortname (not (or site.Params.disable_comments (eq $page.Params.comments false))) }}
|
||||
{{ $comments_enabled := and site.DisqusShortname (in (slice "post" "page") $page.Type) (not (or site.Params.disable_comments (eq $page.Params.comments false))) }}
|
||||
{{ if and $comments_enabled (site.Params.comment_count | default true) }}
|
||||
<span class="middot-divider"></span>
|
||||
<a href="{{ $page.RelPermalink }}#disqus_thread"><!-- Count will be inserted here --></a>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue