added remark42 commenting service

This commit is contained in:
Bangara Raju Kottedi 2023-07-23 02:37:12 +05:30
parent 389df264b9
commit 2272ba9ebf
4 changed files with 33 additions and 28 deletions

View File

@ -82,7 +82,7 @@ avatar: /assets/img/avatar.jpg
toc: true
comments:
active: # The global switch for posts comments, e.g., 'disqus'. Keep it empty means disable
active: 'remark42' # The global switch for posts comments, e.g., 'disqus'. Keep it empty means disable
# The active options are as follows:
disqus:
shortname: # fill with the Disqus shortname. https://help.disqus.com/en/articles/1717111-what-s-a-shortname

5
_includes/comments.html Normal file
View File

@ -0,0 +1,5 @@
<!-- The comments switcher -->
{% if page.comments and site.comments.active %}
{% capture path %}comments/{{ site.comments.active }}.html{% endcapture %}
{% include {{ path }} %}
{% endif %}

View File

@ -0,0 +1,26 @@
<script>
var remark_config = {
host: "https://remark42.kottedi.in",
site_id: 'remark',
secret: 'abcdefgh@4356',
components: ['embed'],
max_shown_comments: 10,
theme: 'light',
locale: 'en',
show_email_subscription: false
};
</script>
<script>
(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>
<div id="remark42"></div>

View File

@ -1,30 +1,4 @@
---
layout: home
# Index page
---
<div id="remark42"></div>
<script>
var remark_config = {
host: "https://remark42.kottedi.in",
site_id: 'remark',
components: ['embed'],
max_shown_comments: 10,
theme: 'light',
locale: 'en',
show_email_subscription: false
};
</script>
<script>
(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>
---