Add commento (#178)
* feat: add commento block Signed-off-by: Kirill K <kovalev.kirill.a@gmail.com> * fix: use params section in config example Signed-off-by: Kirill K <kovalev.kirill.a@gmail.com> * fix: use defer to execute script after page load Signed-off-by: Kirill K <kovalev.kirill.a@gmail.com>
This commit is contained in:
parent
0e3fd736c7
commit
a460bf8838
11
README.md
11
README.md
|
@ -12,7 +12,7 @@ Features
|
||||||
- Accessible
|
- Accessible
|
||||||
- Contact form
|
- Contact form
|
||||||
- Custom Robots.txt (changes values based on environment)
|
- Custom Robots.txt (changes values based on environment)
|
||||||
- Internal templates for meta data, google analytics, and DISQUS comments
|
- Internal templates for meta data, google analytics, and DISQUS or COMMENTO comments
|
||||||
- RSS Discovery
|
- RSS Discovery
|
||||||
- Table of Contents (must declare `toc: true` in post parameter)
|
- Table of Contents (must declare `toc: true` in post parameter)
|
||||||
|
|
||||||
|
@ -71,9 +71,14 @@ You may need to delete the line: `themesDir = "../.."`
|
||||||
|
|
||||||
### Add comments
|
### Add comments
|
||||||
|
|
||||||
To enable DISQUS comments, add `disqusShortname = YOURSHORTNAME` to your config file.
|
To enable comments, add following to your config file:
|
||||||
|
|
||||||
|
|
||||||
|
- DISQUS: `disqusShortname = YOURSHORTNAME`
|
||||||
|
- COMMENTO:
|
||||||
|
```
|
||||||
|
[params]
|
||||||
|
commentoEnable = true`
|
||||||
|
```
|
||||||
|
|
||||||
### Change the hero background
|
### Change the hero background
|
||||||
|
|
||||||
|
|
|
@ -38,7 +38,12 @@
|
||||||
{{- .Content -}}
|
{{- .Content -}}
|
||||||
{{- partial "tags.html" . -}}
|
{{- partial "tags.html" . -}}
|
||||||
<div class="mt6">
|
<div class="mt6">
|
||||||
|
{{ if .Site.DisqusShortname }}
|
||||||
{{ template "_internal/disqus.html" . }}
|
{{ template "_internal/disqus.html" . }}
|
||||||
|
{{ end }}
|
||||||
|
{{ if .Site.Params.commentoEnable }}
|
||||||
|
{{- partial "commento.html" . -}}
|
||||||
|
{{ end }}
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
|
2
layouts/partials/commento.html
Normal file
2
layouts/partials/commento.html
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
<div id="commento"></div>
|
||||||
|
<script defer src="https://cdn.commento.io/js/commento.js"></script>
|
Loading…
Reference in a new issue