Utterances comment not functional any more after we move to surge.sh instead of github pages.
huan opened this issue · 4 comments
huan commented
var commentContainer = document.querySelector('#utterances-comments');
newip commented
Maybe for this round minutes, we could put a Github issue link to make "reply" work from Github to manage newcomer register as the workaround plan...
huan commented
After did some deep digging work, it turns out that:
- The
mmistakes/minimal-mistakes
themes will only enable comments when thejekyll.environment
isproduction
:
https://github.com/mmistakes/minimal-mistakes/blob/b5b8c455306e33f41b5409ab8d51c334e44c1904/_layouts/single.html#L66 - The jekyll default will set the
jekyll.environment
todevelopment
.
See: https://jekyllrb.com/docs/configuration/environments/ - We had switched from Github Pages to CI build by ourselves, and we did not set the environment by ourselves before, which caused it to be
development
.
The fix is to use the following command to build Jekyll:
JEKYLL_ENV=production make serve
huan commented
Online system should have been fixed.
huan commented
Close this issue because @vdeamov confirmed the fix works.