kc0bfv / autophugo

AutoPhugo [ˌɔtoʊˈfjuːgəʊ] is a gallery/photoblog theme for Hugo that's a little more automatic than Phugo.
Other
97 stars 56 forks source link

E-mail form doesn't work due to Formspree removed email-based forms #46

Closed mekr closed 1 year ago

mekr commented 1 year ago

Based on this article they changed how the things works.

Workaround:

  1. Register a formspree account and create a simple form
  2. On the Integration form you'll find an endpoint (eg: https://formspree.io/f/myuniqueid)
  3. Open the Hugo site config.toml file
  4. Under the [params.footer.contact] section change the realEmail to formspreeID (just for clarify the purpose of the field...)
  5. Set the formspreeID value to your Formspree endpoint id (eg.: myuniqueid)
  6. Save config.toml
  7. Open Hugo footer file under themes\autophugo\layouts\partials\footer.html
  8. Change the line <form method="post" action="//formspree.io/{{ with .Site.Params.footer.contact.realEmail }}{{.}}{{ end }}" novalidate> to <form method="post" action="//formspree.io/f/{{ with .Site.Params.footer.contact.formspreeID }}{{.}}{{ end }}" novalidate>
kc0bfv commented 1 year ago

Integrated the pull request. Thank you!