# Embed on Hugo

Use a small shortcode to place your questionnaire in any Hugo page.

## Create the shortcode

Save this as `layouts/shortcodes/estatecanvas.html` in your site's source:

```html
<div data-estatecanvas data-public-key="{{ .Get "key" }}"></div>
<script async src="https://embed.estatecanvas.ca/embed.js"></script>
```

## Add it to a page

Use your actual public embed key from **Website & branding**:

```text
{{< estatecanvas key="YOUR_PUBLIC_EMBED_KEY" >}}
```

This shortcode approach keeps the embed in a template, so you do not need to enable unsafe raw HTML globally in Markdown rendering. Add the shortcode once per intake page.

## Preview and publish

Add the exact development origin from your Hugo preview to [Allowed website domains](/domains/), for example `http://localhost:1313`. `localhost` and `127.0.0.1` are different hosts. Add your production HTTPS domain as well, save the settings, then publish the Hugo site normally.

Test the deployed page using fictional information. Remove the development origin afterward if you no longer need it. The browser downloads the widget at runtime; there are no secret keys or backend dependencies in your Hugo build.
