We've made it as easy as possible to add Formtopia forms to your Hugo site.
First, you need to tell Hugo that you want to install modules by
initializing a module for your project:
If you've already done this, you can skip to the next step.
$ hugo mod init github.com/[your_org]/[your_repo]
Add the PowCloud module to your site's config.toml
file.
TOML format is used for this example, but you can import the module with any supported Hugo configuration format.
[module]
[[module.imports]]
path = "github.com/powcloud/powcloud-hugo"
Run a module update to download the module (and re-run this in the future to update the plugin)
$ hugo mod get -u ./...
Our Hugo plugin adds a shortcode which can be dropped into any content file on your site:
\{{< formtopia/form key="YOUR_FORM_KEY" >}}
You can override the dashboard-configured form content by writing FormML™ in the shortcode's body:
\{{< formtopia/form key="YOUR_FORM_KEY" >}}
name,email,country
\{{</ formtopia/form >}}
In this example, regardless of what content is set in the PowCloud dashboard, the form will show the content generated by the name,email,country
FormML, but will still show up in the dashboard under the list of entries for the provided form key.