Deneb ReactJs documentation

Forms and comments

Connect the contact form to Formspree or Web3Forms, set up the newsletter box, and what to use instead of comments.

Contact form

The contact form is part of the contact section, so it shows wherever a page has type: contact. Its settings are in content/site.yml, under deneb.form:

deneb:
  form:
    provider: demo
    action: ""
provider What happens
demo The form sends nothing. It shows a notice when someone submits. This is the default
formspree The form posts to the address in action
web3forms The form posts to the address in action. It can also send an access_key

Until you connect a service, visitors see the demo notice. Connect one before you go live.

Formspree

  1. Create a form at formspree.io and copy its address.
  2. Set:
deneb:
  form:
    provider: formspree
    action: https://formspree.io/f/your-form-id

Web3Forms

  1. Get an access key at web3forms.com.
  2. Set:
deneb:
  form:
    provider: web3forms
    action: https://api.web3forms.com/submit
    access_key: your-access-key

The key is added to the form as a hidden access_key field. It is public by design. Both services let you limit where a form can be used.

The form fields

The form sends name, email, company, budget, message and consent. The words are in content/data/i18n.yml: form_name, form_email, form_company, form_budget, form_message, form_consent and the budget choices budget_1 to budget_4. To change the fields themselves, edit components/sections/Contact.js.

The form is a normal HTML form, so it needs no JavaScript to send. In demo mode a small client component, components/sections/DemoForm.js, shows the notice.

Privacy

content/pages/privacy.md is demo text. Replace it with your own notice before you go live, and say which form service receives your messages.

Newsletter

The footer has a sign-up box. Set it under deneb.newsletter in content/site.yml:

deneb:
  newsletter:
    title: Get our monthly notes
    text: One email a month on design and growth. No spam.
    action: https://your-email-service.example/subscribe

action is the form address your email service gives you. The box posts the visitor’s email to it. Delete the whole newsletter: block to hide the box.

Comments

Deneb React 3.0 has no comments. The old Disqus setup from earlier versions is gone, and nothing replaces it.

If you want comments, add a service of your own, such as a hosted comment widget, in app/blog/[slug]/page.js. Or point readers to your contact form or your social profiles.