DISQUS을 이용한 댓글 기능 추가하기
1. DISQUS 가입하기
① DISQUS 에 접속 후 가입한다.
② profile 등록과 new site를 등록한다.
1) Profile 등록
-2) new site 등록
Website Name 에 블로그의 url을 기입한다.
③ _config.yml 파일 수정
-1) admin 사이트 접속
-2) shortname 찾기
shortname은 admin 메뉴로 들어갔을 때 url의 첫 부분이다.
-3) code 수정
comments:
provider: "disqus"
disqus:
shortname : "블로그이름-github-io"
[수행 화면]
2. 댓글을 설정하고자 하는 Html 수정하기
★ post 하단에서만 댓글을 남기도록 설정하였다. (about me 파일에서는 댓글을 남기지 못합니다.)
① admin > start > install disqus > install instructions 메뉴로 접속하여 첫번째 코드를 복사한다.
② 댓글을 허용하고자 하는 html 하단에 html 코드를 넣는다.
<div id="disqus_thread"></div>
<script>
/**
* RECOMMENDED CONFIGURATION VARIABLES: EDIT AND UNCOMMENT THE SECTION BELOW TO INSERT DYNAMIC VALUES FROM YOUR PLATFORM OR CMS.
* LEARN WHY DEFINING THESE VARIABLES IS IMPORTANT: https://disqus.com/admin/universalcode/#configuration-variables */
/*
var disqus_config = function () {
this.page.url = PAGE_URL; // Replace PAGE_URL with your page's canonical URL variable
this.page.identifier = PAGE_IDENTIFIER; // Replace PAGE_IDENTIFIER with your page's unique identifier variable
};
*/
(function () { // DON'T EDIT BELOW THIS LINE
var d = document, s = d.createElement('script');
s.src = 'https://https-sb121300-github-io.disqus.com/embed.js';
s.setAttribute('data-timestamp', +new Date());
(d.head || d.body).appendChild(s);
})();
</script>
<noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript">comments powered by
Disqus.</a></noscript>
3. 실행 화면
[댓글 화면]
[DisQus에서 댓글 조회]
DISQUS의 admin으로 접속하면 그동안 기록되었던 comment를 볼 수 있다.
'컴퓨터이론 > Github & Jekyll' 카테고리의 다른 글
[Jekyll] Jekyll google analytics 사용하기 (0) | 2022.01.05 |
---|---|
[Jekyll] Jekyll Favicon 생성하기 (0) | 2022.01.05 |
[Jekyll] Jekyll 블로그 생성 및 테마 적용하기 (0) | 2022.01.05 |