Skip to content
This repository was archived by the owner on Jul 1, 2020. It is now read-only.

Commit c7dcfa6

Browse files
Add option to disable comments for pages
1 parent a86c6d8 commit c7dcfa6

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

exampleSite/content/post/introducing-icarus-and-its-features.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,18 @@ Now, let us take a look into the `config.toml`. Feel free to play around with th
5252

5353
### Comments
5454

55-
The opional comment system is powered by Disqus. Enter your shortname to enable the comment section under your posts.
55+
The optional comment system is powered by Disqus. Enter your shortname to enable the comment section under your posts.
5656

5757
disqusShortname = ""
5858

59+
Tip: you can disable the comment section for a single page in its frontmatter:
60+
61+
```toml
62+
+++
63+
disable_comments = true
64+
+++
65+
```
66+
5967

6068
### Menu
6169

layouts/partials/single_article.html

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,12 @@
1818

1919
{{ partial "prev_next_post" . }}
2020
</article>
21+
22+
{{ if not .Params.disable_comments }}
2123
<section id="comments">
2224
<div id="disqus_thread">
2325
{{ template "_internal/disqus.html" . }}
2426
</div>
2527
</section>
26-
28+
{{ end }}
2729
</section>

0 commit comments

Comments
 (0)