include_cached
preventing Disqus comments from displaying #1905
Description
Environment
- Minimal Mistakes version: 4.13.0
- Ruby gem or remote theme version: remote theme version used
- Jekyll version: 3.7.4
- Git repository URL: https://github.com/paulfioravanti/paulfioravanti.github.io
- GitHub Pages hosted (if yes provide URL to site): https://paulfioravanti.com
- Operating system: Mac OS High Sierra 10.13.6 (17G65)
Expected behavior
Disqus comments display underneath a post when site.comments.provider
is "disqus"
.
Steps to reproduce the behavior
No specific steps to re-produce as the comments were working previously at some point in the past, and then one day I noticed they were not displaying anymore. However, I suspect that #1874 could be a potential cause (see further information below for reasoning).
The log of bundle exec jekyll build --trace --verbose
was quite long, so I put it in this gist.
Other
Here is a screenshot of running JEKYLL_ENV=production bundle exec jekyll liveserve
on my local machine with the current version of Minimal Mistakes, where you can see that comments are not displaying:
Here is a screenshot of running JEKYLL_ENV=production bundle exec jekyll liveserve
on my local machine after making the following changes:
- Copying the content of
_layouts/default.html
to a local_layouts/default.html
file, and changingminimal-mistakes/_layouts/default.html
Line 39 in c8f4820
from{% include_cached scripts.html %}
to{% include scripts.html %}
- Copying the content of
_includes/scripts.html
to a local_includes/scripts.html
file, and changingminimal-mistakes/_includes/scripts.html
Line 28 in c8f4820
{% include_cached /comments-providers/scripts.html %}
to{% include /comments-providers/scripts.html %}
Making these changes does output some Javascript errors in the console, unfortunately:
However, since the comments are now displaying, I see the Javascript errors as the lesser of two issues. Hence, I have deployed out this change to my site on Github Pages, and can confirm that comments are displaying there as expected.
I haven't made a PR with the changes I've outlined since it brings up JS issues and I cannot confirm that the issue exists for other comment providers, but am happy to provide any further information I may have neglected to put in this issue.