Add necessary for Commento
This commit is contained in:
parent
deb93bf504
commit
c99f3aa0ca
4 changed files with 26 additions and 0 deletions
|
|
@ -10,6 +10,7 @@
|
||||||
post-container">
|
post-container">
|
||||||
|
|
||||||
{{ .Content }}
|
{{ .Content }}
|
||||||
|
{{ partial "comments.html" . }}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<!-- Sidebar Container -->
|
<!-- Sidebar Container -->
|
||||||
|
|
|
||||||
|
|
@ -76,6 +76,7 @@
|
||||||
</a>
|
</a>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</div>
|
</div>
|
||||||
|
{{ partial "comments.html" . }}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<!-- Sidebar Container -->
|
<!-- Sidebar Container -->
|
||||||
|
|
|
||||||
19
layouts/partials/comments.html
Normal file
19
layouts/partials/comments.html
Normal file
|
|
@ -0,0 +1,19 @@
|
||||||
|
{{ if .Site.Params.disqus_proxy }}
|
||||||
|
<div id="disqus-comment"></div>
|
||||||
|
<script src="{{ "js/iDisqus.js" | relURL }}"></script>
|
||||||
|
<script>
|
||||||
|
var disq = new iDisqus('disqus-comment', {
|
||||||
|
forum: '{{ .Site.DisqusShortname}}',
|
||||||
|
api: '{{ .Site.Params.disqus_proxy }}',
|
||||||
|
site: '{{ .Site.Params.disqus_site }}',
|
||||||
|
mode: 1,
|
||||||
|
timeout: 5000,
|
||||||
|
init: true
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
{{ else if .Site.DisqusShortname }}
|
||||||
|
<div id="disqus-comment"></div>
|
||||||
|
{{ template "_internal/disqus.html" . }}
|
||||||
|
{{ else if .Site.Params.Commento }}
|
||||||
|
<div id="commento"></div>
|
||||||
|
{{ end }}
|
||||||
|
|
@ -91,6 +91,11 @@
|
||||||
</script>
|
</script>
|
||||||
<script type="text/javascript" src="{{"js/search.js" | relURL}}"></script>
|
<script type="text/javascript" src="{{"js/search.js" | relURL}}"></script>
|
||||||
|
|
||||||
|
{{ with .Site.Params.Commento }}
|
||||||
|
<!-- Commento JavaScript -->
|
||||||
|
<script defer src="{{ .scheme | default "https" }}://{{ .host }}/{{ .path | default "js/commento.js" }}"></script>
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
<!-- Custom JS -->
|
<!-- Custom JS -->
|
||||||
{{ range .Site.Params.custom_js }}
|
{{ range .Site.Params.custom_js }}
|
||||||
<script src="{{ . | absURL }}"></script>
|
<script src="{{ . | absURL }}"></script>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue