-
Notifications
You must be signed in to change notification settings - Fork 36
Expand file tree
/
Copy pathdisqus.html
More file actions
40 lines (40 loc) · 1.39 KB
/
disqus.html
File metadata and controls
40 lines (40 loc) · 1.39 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
{#-
This file was automatically generated - do not edit
-#}
{% set disqus = config.extra.disqus %}
{% if page and page.meta and page.meta.disqus is string %}
{% set disqus = page.meta.disqus %}
{% endif %}
{% if not page.is_homepage and disqus %}
<h2 id="__comments">{{ lang.t("meta.comments") }}</h2>
<div id="disqus_thread"></div>
<script>
var disqus_config = function () {
this.page.url = "{{ page.canonical_url }}";
this.page.identifier =
"{{ page.canonical_url | replace(config.site_url, "") }}";
};
(function() {
var d = document, s = d.createElement("script");
s.src = "//{{ disqus }}.disqus.com/embed.js";
s.setAttribute("data-timestamp", +new Date());
(d.head || d.body).appendChild(s);
})();
</script>
{% endif %}
{% set utteranc = config.extra.utteranc %}
{% if page and page.meta and page.meta.utteranc is string %}
{% set utteranc = page.meta.utteranc %}
{% endif %}
{% if not page.is_homepage and utteranc %}
<h2 id="__comments">{{ lang.t("meta.comments") }}</h2>
<div id="utteranc-comment"></div>
<script src="https://utteranc.es/client.js"
label="utteranc-comment"
repo="{{ config.extra.utteranc.repo }}"
issue-term="{{ config.extra.utteranc.issueTerm | d('pathname') }}"
theme="{{ config.extra.utteranc.theme | d('github-light') }}"
crossorigin="anonymous"
async>
</script>
{% endif %}