For those searching on adding a newsletter email signup form to any Publii site (and using Netlify to host your site)
You can use Netlify Forms. My mind was blown at how easy this was.
Go to “source code” in the WYSIWYG editor and add:
<form action="/signedup" method="POST" data-netlify="true"><p class="align-center"><label><input name="email" type="email" placeholder="enter email for newsletter"></label> <button type="submit">Signup</button></p></form>
- MAKE sure to add a post page with link “signedup” [which would be yoursite.com/signedup] in this example if you want visitor directed to a custom success message after the submit button is clicked
- Or customize your own link in the form’s action attribute above, such as action=”/newsletter-success”
- You can also customize the default text shown in the text field by editing the placeholder attribute above, such as placeholder=”email address”
- NOW deploy your site to Netlify from Publii
- THEN go to Netlify forms and enable the auto form search.
- That’s it. All your email signups now go to netlify, 100 free/month is great for small nonprofits etc.
Hope this helps someone.