# Hugo

MuxForms on Hugo is a layouts/partials/muxforms-contact.html partial with the div and script, included from content/contact.md. Allow your GitHub Pages, Netlify, or Cloudflare origin.

## Hugo

| File | Role |
| --- | --- |
| layouts/partials/muxforms.html | Snippet |
| content/contact.md | {{ partial }} call |
| config | baseURL for allowlist hint |
| Deploy | Any static host |

## layouts/partials/muxforms-contact.html

```
<div data-form-id="{{ .Site.Params.muxFormId | default "FORM_UUID" }}"></div>
<script src="https://www.muxforms.com/embed.js" defer></script>
```

## content/contact.md

```
---
title: "Contact"
layout: contact
---
```

## layouts/contact.html

```
{{ define "main" }}
  <h1>Contact</h1>
  {{ partial "muxforms-contact.html" . }}
{{ end }}
```

## FAQ

### Goldmark raw HTML?

Partials render unescaped HTML by default in layouts.

### Multilingual sites?

One partial; translate headings in content files.

### Environment-specific form id?

Use Hugo params in config.toml for dev vs prod UUIDs.

### GitHub Pages?

See /docs/github-pages for origin allowlist.

---

HTML version: https://www.muxforms.com/docs/hugo
Source: MuxForms (https://www.muxforms.com)
