BUPT/clubber.ml

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');

See: https://ai-ml.club/events/seminar-meeting-minutes-3-3/

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:

  1. The mmistakes/minimal-mistakes themes will only enable comments when the jekyll.environment is production:
    https://github.com/mmistakes/minimal-mistakes/blob/b5b8c455306e33f41b5409ab8d51c334e44c1904/_layouts/single.html#L66
  2. The jekyll default will set the jekyll.environment to development.
    See: https://jekyllrb.com/docs/configuration/environments/
  3. 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.