Description
Environment
- Minimal Mistakes version: 4.18.1
- Ruby gem or remote theme version: jekyll-remote-theme (0.4.1)
- Jekyll version: 3.8.5
- Git repository URL: http://github.com/travisdowns/mm-test
- Operating system: Linux
Expected behavior
The staticman configuration implementation and doc seems a bit inconsistent. The configuration doc shows that the branch
key should be nested under comments
, i.e., at site.comments.staticman.branch
:
However, in the template _config.yml in master, staticman
is not nested under comments, but at the top level:
I believe this is the way it was supposed to work for staticman v1, because the staticman API bridge lookins in _config.yml for it's own configuration parameters.
However, for v2
, this stuff goes in a separate staticman.yml
file. So the actual bug I find is that in the staticman_v2 provider, it is checking the not-nested site.staticman.branch
, rather than site.comments.staticman.branch
:
This means if you configure staticman v2, it will be missing the javascript associated with form submission. As it turns out, comment submission will still go through, but you end up getting redirected to the JSON results page of the API bridge, because the default action
is to do that, when the JS is missing, I guess.
Suggested fix:
- Change
site.staticman.branch
tosite.comments.staticman.branch
in the v2 provider. - Clarify the documentation and default config.yml where to put the staticman stuff depending on the version. Include nested under
comments
the v2 configuration for staticman.
Workaround:
To get the comments working in the meantime, you can just include a redundant staticman.branch
key at the top level so the check in the v2 provider passes, which is what I'm doing:
comments:
provider: "staticman_v2"
staticman:
branch: "master"
endpoint: https://staticman-travisdownsio.herokuapp.com/v2/entry/
# redundant, needed only as workaround for provider_v2.html bug
staticman:
branch: "master"