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:
|
||||
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:
|
||||
host: 'https://remark42.kottedi.in'
|
||||
site_id: 'blog'
|
||||
disqus:
|
||||
shortname: # fill with the Disqus shortname. › https://help.disqus.com/en/articles/1717111-what-s-a-shortname
|
||||
# utterances settings › https://utteranc.es/
|
||||
@ -200,4 +199,10 @@ jekyll-archives:
|
||||
category: /categories/:name/
|
||||
|
||||
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>
|
||||
var remark_config = {
|
||||
host: "{{ site.comments.remark42.host }}",
|
||||
site_id: '{{ site.comments.remark42.site_id }}',
|
||||
site_id: '{{ site.id }}',
|
||||
components: ['embed'],
|
||||
|
||||
max_shown_comments: 10,
|
||||
|
||||
@ -25,7 +25,7 @@
|
||||
var siteId = "{{ site.id }}";
|
||||
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) {
|
||||
console.log(result); // Code depending on result
|
||||
document.getElementById('postvisitcounter').innerText = result;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user