Quellcode durchsuchen

Switch to Hugo's built-in Disqus template

digitalcraftsman vor 7 Jahren
Ursprung
Commit
eab1974019
2 geänderte Dateien mit 5 neuen und 10 gelöschten Zeilen
  1. 3
    8
      README.md
  2. 2
    2
      layouts/_default/single.html

+ 3
- 8
README.md Datei anzeigen

119
 
119
 
120
 ### Disqus
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
 **TOML**
124
 **TOML**
125
 ```toml
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
 ## Author
131
 ## Author
137
 **Mark Otto**
132
 **Mark Otto**

+ 2
- 2
layouts/_default/single.html Datei anzeigen

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