+ remark42 comments
This commit is contained in:
parent
dbb1da9360
commit
48e24ec2fc
@ -24,6 +24,7 @@ pygmentsCodefencesGuessSyntax = true
|
|||||||
readingTime = true
|
readingTime = true
|
||||||
wordCount = true
|
wordCount = true
|
||||||
useHLJS = true
|
useHLJS = true
|
||||||
|
selfHosted=true
|
||||||
socialShare = true
|
socialShare = true
|
||||||
delayDisqus = true
|
delayDisqus = true
|
||||||
showRelatedPosts = true
|
showRelatedPosts = true
|
||||||
|
84
layouts/_default/single.html
Normal file
84
layouts/_default/single.html
Normal file
@ -0,0 +1,84 @@
|
|||||||
|
{{ define "main" }}
|
||||||
|
<div class="container" role="main">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
|
||||||
|
<article role="main" class="blog-post">
|
||||||
|
{{ .Content }}
|
||||||
|
|
||||||
|
{{ if .Params.tags }}
|
||||||
|
<div class="blog-tags">
|
||||||
|
{{ range .Params.tags }}
|
||||||
|
<a href="{{ $.Site.LanguagePrefix | absURL }}/tags/{{ . | urlize }}/">{{ . }}</a>
|
||||||
|
{{ end }}
|
||||||
|
</div>
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
{{ if $.Param "socialShare" }}
|
||||||
|
<hr/>
|
||||||
|
<section id="social-share">
|
||||||
|
<div class="list-inline footer-links">
|
||||||
|
{{ partial "share-links" . }}
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
{{ if .Site.Params.showRelatedPosts }}
|
||||||
|
{{ $related := .Site.RegularPages.Related . | first 3 }}
|
||||||
|
{{ with $related }}
|
||||||
|
<h4 class="see-also">{{ i18n "seeAlso" }}</h4>
|
||||||
|
<ul>
|
||||||
|
{{ range . }}
|
||||||
|
<li><a href="{{ .RelPermalink }}">{{ .Title }}</a></li>
|
||||||
|
{{ end }}
|
||||||
|
</ul>
|
||||||
|
{{ end }}
|
||||||
|
{{ end }}
|
||||||
|
</article>
|
||||||
|
|
||||||
|
{{ if ne .Type "page" }}
|
||||||
|
<ul class="pager blog-pager">
|
||||||
|
{{ if .PrevInSection }}
|
||||||
|
<li class="previous">
|
||||||
|
<a href="{{ .PrevInSection.Permalink }}" data-toggle="tooltip" data-placement="top" title="{{ .PrevInSection.Title }}">← {{ i18n "previousPost" }}</a>
|
||||||
|
</li>
|
||||||
|
{{ end }}
|
||||||
|
{{ if .NextInSection }}
|
||||||
|
<li class="next">
|
||||||
|
<a href="{{ .NextInSection.Permalink }}" data-toggle="tooltip" data-placement="top" title="{{ .NextInSection.Title }}">{{ i18n "nextPost" }} →</a>
|
||||||
|
</li>
|
||||||
|
{{ end }}
|
||||||
|
</ul>
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
{{ if (.Params.comments) | or (and (or (not (isset .Params "comments")) (eq .Params.comments nil)) (and .Site.Params.comments (ne .Type "page"))) }}
|
||||||
|
{{ partial "remark42.html" . }}
|
||||||
|
{{ if .Site.DisqusShortname }}
|
||||||
|
{{ if .Site.Params.delayDisqus }}
|
||||||
|
<div class="disqus-comments">
|
||||||
|
<button id="show-comments" class="btn btn-default" type="button">{{ i18n "show" }} <span class="disqus-comment-count" data-disqus-url="{{ trim .Permalink "/" }}">{{ i18n "comments" }}</span></button>
|
||||||
|
<div id="disqus_thread"></div>
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
var disqus_config = function () {
|
||||||
|
this.page.url = '{{ trim .Permalink "/" }}';
|
||||||
|
};
|
||||||
|
|
||||||
|
</script>
|
||||||
|
</div>
|
||||||
|
{{ else }}
|
||||||
|
<div class="disqus-comments">
|
||||||
|
{{ template "_internal/disqus.html" . }}
|
||||||
|
</div>
|
||||||
|
{{ end }}
|
||||||
|
{{ end }}
|
||||||
|
{{ if .Site.Params.staticman }}
|
||||||
|
<div class="staticman-comments">
|
||||||
|
{{ partial "staticman-comments.html" . }}
|
||||||
|
</div>
|
||||||
|
{{ end }}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{{ end }}
|
@ -1 +1,22 @@
|
|||||||
|
{{ if or (eq (substr .URL 0 6) "/post/") (eq (substr .URL 0 6) "/page/") }}
|
||||||
|
<script type="text/javascript">
|
||||||
|
var remark_config = {
|
||||||
|
host: "https://remark.b4tman.ru",
|
||||||
|
site_id: 'blog.b4tman.ru',
|
||||||
|
components: ['embed'],
|
||||||
|
max_shown_comments: 15,
|
||||||
|
theme: 'light'
|
||||||
|
};
|
||||||
|
|
||||||
|
(function(c) {
|
||||||
|
for(var i = 0; i < c.length; i++){
|
||||||
|
var d = document, s = d.createElement('script');
|
||||||
|
s.src = remark_config.host + '/web/' +c[i] +'.js';
|
||||||
|
s.defer = true;
|
||||||
|
(d.head || d.body).appendChild(s);
|
||||||
|
}
|
||||||
|
})(remark_config.components || ['embed']);
|
||||||
|
</script>
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
<!-- Yandex.Metrika counter --> <script type="text/javascript" > (function (d, w, c) { (w[c] = w[c] || []).push(function() { try { w.yaCounter48214757 = new Ya.Metrika2({ id:48214757, clickmap:true, trackLinks:true, accurateTrackBounce:true, trackHash:true, ut:"noindex" }); } catch(e) { } }); var n = d.getElementsByTagName("script")[0], s = d.createElement("script"), f = function () { n.parentNode.insertBefore(s, n); }; s.type = "text/javascript"; s.async = true; s.src = "https://mc.yandex.ru/metrika/tag.js"; if (w.opera == "[object Opera]") { d.addEventListener("DOMContentLoaded", f, false); } else { f(); } })(document, window, "yandex_metrika_callbacks2"); </script> <noscript><div><img src="https://mc.yandex.ru/watch/48214757?ut=noindex" style="position:absolute; left:-9999px;" alt="" /></div></noscript> <!-- /Yandex.Metrika counter -->
|
<!-- Yandex.Metrika counter --> <script type="text/javascript" > (function (d, w, c) { (w[c] = w[c] || []).push(function() { try { w.yaCounter48214757 = new Ya.Metrika2({ id:48214757, clickmap:true, trackLinks:true, accurateTrackBounce:true, trackHash:true, ut:"noindex" }); } catch(e) { } }); var n = d.getElementsByTagName("script")[0], s = d.createElement("script"), f = function () { n.parentNode.insertBefore(s, n); }; s.type = "text/javascript"; s.async = true; s.src = "https://mc.yandex.ru/metrika/tag.js"; if (w.opera == "[object Opera]") { d.addEventListener("DOMContentLoaded", f, false); } else { f(); } })(document, window, "yandex_metrika_callbacks2"); </script> <noscript><div><img src="https://mc.yandex.ru/watch/48214757?ut=noindex" style="position:absolute; left:-9999px;" alt="" /></div></noscript> <!-- /Yandex.Metrika counter -->
|
5
layouts/partials/remark42.html
Normal file
5
layouts/partials/remark42.html
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
<div id="remark42" class="comments">
|
||||||
|
<noscript>
|
||||||
|
Please enable JavaScript to view the comments powered by Remark42.
|
||||||
|
</noscript>
|
||||||
|
</div>
|
Loading…
Reference in New Issue
Block a user