Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Recaptcha support #10

Merged
merged 2 commits into from Jul 7, 2019

Conversation

Projects
None yet
2 participants
@VincentTam
Copy link
Collaborator

commented Jul 6, 2019

A port of MunifTanjim/minimo#224. TODO

  • Go-HTML template file
  • doucmentation update
    1. README: users would see the recommendation to use reCATPCHA, and are referred to site config
    2. config.toml: users would see the commented guide for reCATPCHA setup, and are referred to Staticman repo config
    3. staticman.yml (root-level): at the first glance, everyone knows that this theme would support reCAPTCHA v2.
      • reCAPTCHA users: change enabled to true, and the commented lines show them what to do. It'd be clear that they have to use /v3/encrypt, contrary to Staticman's documentation.
      • non users: just keep this section untouched. reCAPTCHA would be disabled.
    4. LICENSE: give credits to the original authors of the code
    5. Go-HTML template file: mostly copied from the linked PR, with some necessary adaptions to this theme's template code. Note that I didn't implement the "input reCAPTCHA parameters only once" here. My reason is to avoid loading the entire staticman.yml for each site regeneration for just two reCAPTCHA parameters, which are usually loaded from the site config file. The linked PR uses Hugo cache, which quite complicated.
  • test feature at my demo site: https://staticman-gitlab-pages.frama.io/hugo-swift-theme
  • CSS issues: I'll leave this since I'm not quite familiar with CSS
    • vertical separation around the reCAPTCHA box
    • opacity of the submit button when disabled
@onweru

This comment has been minimized.

Copy link
Owner

commented Jul 7, 2019

Awesome 😍. Excellent addition @VincentTam. Merging.

@onweru onweru merged commit ce9edfa into onweru:master Jul 7, 2019

@onweru

This comment has been minimized.

Copy link
Owner

commented Jul 7, 2019

I'll see about the css styling later when I can ... thanks for being thorough

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.