BUPT / clubber.ml

A.M.C. - Artificial Intelligence & Machine Learning CLUB: Friends for Code, Paper, and Beers!🍻
https://ai-ml.club
Apache License 2.0
120 stars 37 forks source link

Utterances comment not functional any more after we move to surge.sh instead of github pages. #355

Closed huan closed 4 years ago

huan commented 4 years ago
var commentContainer = document.querySelector('#utterances-comments');

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

newip commented 4 years ago

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 4 years ago

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 4 years ago

Online system should have been fixed.

huan commented 4 years ago

Close this issue because @vdeamov confirmed the fix works.