added post view counter service
This commit is contained in:
parent
346bb1877c
commit
1b91ea1be3
@ -9,4 +9,9 @@ comments:
|
|||||||
# remark42 settings > https://remark42.com/
|
# remark42 settings > https://remark42.com/
|
||||||
remark42:
|
remark42:
|
||||||
host: 'https://remark42.kottedi.in'
|
host: 'https://remark42.kottedi.in'
|
||||||
site_id: 'blog-uat'
|
|
||||||
|
|
||||||
|
# Custom configuration
|
||||||
|
custom-config:
|
||||||
|
blog-services:
|
||||||
|
service_url: 'http://localhost:5016'
|
||||||
@ -88,7 +88,6 @@ comments:
|
|||||||
# remark42 settings > https://remark42.com/
|
# remark42 settings > https://remark42.com/
|
||||||
remark42:
|
remark42:
|
||||||
host: 'https://remark42.kottedi.in'
|
host: 'https://remark42.kottedi.in'
|
||||||
site_id: 'blog'
|
|
||||||
disqus:
|
disqus:
|
||||||
shortname: # fill with the Disqus shortname. › https://help.disqus.com/en/articles/1717111-what-s-a-shortname
|
shortname: # fill with the Disqus shortname. › https://help.disqus.com/en/articles/1717111-what-s-a-shortname
|
||||||
# utterances settings › https://utteranc.es/
|
# utterances settings › https://utteranc.es/
|
||||||
@ -201,3 +200,9 @@ jekyll-archives:
|
|||||||
|
|
||||||
show_drafts: false
|
show_drafts: false
|
||||||
future: false
|
future: false
|
||||||
|
|
||||||
|
|
||||||
|
# Custom configuration
|
||||||
|
custom-config:
|
||||||
|
blog-services:
|
||||||
|
service_url: 'https://blog-services.kottedi.in'
|
||||||
@ -1,7 +1,7 @@
|
|||||||
<script>
|
<script>
|
||||||
var remark_config = {
|
var remark_config = {
|
||||||
host: "{{ site.comments.remark42.host }}",
|
host: "{{ site.comments.remark42.host }}",
|
||||||
site_id: '{{ site.comments.remark42.site_id }}',
|
site_id: '{{ site.id }}',
|
||||||
components: ['embed'],
|
components: ['embed'],
|
||||||
|
|
||||||
max_shown_comments: 10,
|
max_shown_comments: 10,
|
||||||
|
|||||||
@ -25,7 +25,7 @@
|
|||||||
var siteId = "{{ site.id }}";
|
var siteId = "{{ site.id }}";
|
||||||
var postId = "{{ page.title }}";
|
var postId = "{{ page.title }}";
|
||||||
|
|
||||||
ajax("http://localhost:5016/GetCounter?siteId="+ siteId + "&postId=" + postId)
|
ajax("{{site.custom-config.blog-services.service_url}}/GetPostViews?siteId="+ siteId + "&postId=" + postId)
|
||||||
.then(function(result) {
|
.then(function(result) {
|
||||||
console.log(result); // Code depending on result
|
console.log(result); // Code depending on result
|
||||||
document.getElementById('postvisitcounter').innerText = result;
|
document.getElementById('postvisitcounter').innerText = result;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user