Skip to content

Commit

Permalink
Switch to Hugo's built-in Disqus template
Browse files Browse the repository at this point in the history
  • Loading branch information
digitalcraftsman committed Sep 7, 2017
1 parent 8349cf1 commit eab1974
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 deletions.
11 changes: 3 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,19 +119,14 @@ params:

### Disqus

You can optionally enable a comment system powered by Disqus for the posts. Simply add the variable `disqusShortname` to the `params` in your config file.
You can optionally enable a comment system powered by Disqus for the posts. Simply add the variable `disqusShortname` to your config file.

**TOML**
```toml
[params]
disqusShortname = "spf13"
disqusShortname = "spf13"
```

**YAML**
```yaml
params:
disqusShortname: "spf13"
```
> **Note:** Previous version 1.0 the Disqus shortname had to be defined inside the `[params]` block.
## Author
**Mark Otto**
Expand Down
4 changes: 2 additions & 2 deletions layouts/_default/single.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ <h1>{{ .Title }}</h1>
{{ .Content }}
</div>

{{ if .Site.Params.disqusShortname -}}
{{ if .Site.DisqusShortname -}}
<h2>Comments</h2>

{{ template "_internal/disqus.html" . }}
{{- end }}
{{- end }}

0 comments on commit eab1974

Please sign in to comment.