hugo-dusk
hugo-dusk copied to clipboard
Add staticman support
trafficstars
Add support for comments from an instance of Staticman. See my series on static comment support - Staticman with GitHub and Zeit Now
Note: this PR includes PR #29
I appreciate your effort and thanks for sharing your tweak. IMHO, this PR can be improved in many ways:
- Move form POST URL to a separate JavaScript file to avoid sραm.
- Refactor the parameters in
config.tomland replace theapi_versionparameter withgit_providerto encourage users to use Staticman's v3 API scheme (and in case of a GitHub repo: GitHub App authorization method), which is recommended in Staicman's updated quick start guide. - Provide relevant documentation and/or sample config param in
config.tomland README for ease of use. You may view popular themes with Staticman support that I've contributed to as examples, e.g. Beautiful Hugo, Minimal Mistakes, Beautiful Jekyll. - (Optional, but suggested against spam) Add support for reCAPTCHA v2: users can choose to enable it or not
- (Optional) Support nested comments
https://github.com/gyorb/hugo-dusk/blob/ed4615dff9f400942d229fa6cadcd58bbe3840d0/layouts/partials/staticman/create-comment.html#L1