Browse Source

Switch to Hugo's built-in Disqus template

digitalcraftsman 7 years ago
parent
commit
eab1974019
2 changed files with 5 additions and 10 deletions
  1. 3
    8
      README.md
  2. 2
    2
      layouts/_default/single.html

+ 3
- 8
README.md View File

@@ -119,19 +119,14 @@ params:
119 119
 
120 120
 ### Disqus
121 121
 
122
-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.
122
+You can optionally enable a comment system powered by Disqus for the posts. Simply add the variable `disqusShortname` to  your config file.
123 123
 
124 124
 **TOML**
125 125
 ```toml
126
-[params]
127
-  disqusShortname = "spf13"
126
+disqusShortname = "spf13"
128 127
 ```
129 128
 
130
-**YAML**
131
-```yaml
132
-params:
133
-  disqusShortname: "spf13"
134
-```
129
+> **Note:** Previous version 1.0 the Disqus shortname had to be defined inside the `[params]` block.
135 130
 
136 131
 ## Author
137 132
 **Mark Otto**

+ 2
- 2
layouts/_default/single.html View File

@@ -5,8 +5,8 @@
5 5
   {{ .Content }}
6 6
 </div>
7 7
 
8
-{{ if .Site.Params.disqusShortname -}}
8
+{{ if .Site.DisqusShortname -}}
9 9
 <h2>Comments</h2>
10
-
10
+{{ template "_internal/disqus.html" . }}
11 11
 {{- end }}
12 12
 {{- end }}