Closed
Description
Environment
- Minimal Mistakes version: 4.19.1
- Jekyll version: 3.0.6
- Git repository URL: https://github.com/sunete/sunete.github.io
- GitHub Pages hosted (if yes provide URL to site): https://sunete.github.io/
- Operating system: Windows 10
Expected behavior
I tried to custom comment. But the custom comment box appeared under the footer. What shuold I do to fix it?
Steps to reproduce the behavior
I tried to custom comment. The comments provider I used is valine comment. But when I added html code to the _includes\comments-providers\custom.html , the comment box appeared under the footer.
Other
I'm not very good at programming. Could you help me fix my code please?
Custom comment code in _includes\comments-providers\custom.html
<script src="//cdn1.lncld.net/static/js/3.0.4/av-min.js"></script>
<script src='//unpkg.com/valine/dist/Valine.min.js'></script>
<body>
<div id="vcomments"></div>
<script>
new Valine({
el: '#vcomments',
appId: 'fBruNownJxl4LxbgbUmhSNbG-gzGzoHsz',
appKey: 'iLHQpvO6X1Quor49czkLLi6m',
visitor: true
})
</script>
</body>
Activity
iBug commentedon Jun 1, 2020
Duplicate of #2343.
sunete commentedon Jun 1, 2020
I tried to run
JEKYLL_ENV=production bundle exec jekyll build
as you mentioned in the issue #2343 , but it didn't work. Then I tried to run shell below, the comment still in the wrong position like before. Is there any fault in my operation?iBug commentedon Jun 2, 2020
Your addition of an extra
<body>
tag looks erroneous. Perhaps you should try removing the wrong tags?sunete commentedon Jun 3, 2020
Even if I remove the
body
tag it still in the wrong position. I commited it to the repository so you can have a look.My last commit: Enable custom comment for testing.
My website: Example of a comment box in the wrong positon.
Besides, I found that no matter what I added in

custom.html
, it would appear under the footer.For example, I only put<p>I have a cute cat.</p>
incustom.html
, this sentence will appear under the footer like before.mmistakes commentedon Jun 3, 2020
The issue is
/comments-providers/custom.html
is for scripts only. This include is loaded after the footer.You need to edit
_includes/comments.html
on this line and replace with comment HTML you need there. Probably the easier thing would be to drop in your scripts there too and forget about/comments-providers/custom.html
Replace custom comment hardcoded HTML with include
Replace custom comment hardcoded HTML with include
Replace custom comment hardcoded HTML with include
Replace custom comment hardcoded HTML with include
Replace custom comment hardcoded HTML with include