# Add Ishara to Eleventy

Add the feedback widget to an Eleventy site by pasting one script tag into a shared base layout, then making it every page’s layout.

- Where it goes: Your base layout, e.g. `_includes/base.njk`
- Allowed domains: your own domain
- Time: about 3 minutes

## Steps

1. In Ishara, open **Sites → your site → Install** and copy the line under **Add the line to your site**. Your site’s key is already in it:

```html
<script src="https://useishara.com/w.js" data-site="pk_…" defer></script>
```

2. In your base layout, such as `_includes/base.njk`, paste the line just before `</body>`:

```
<!doctype html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <title>{{ title }}</title>
  </head>
  <body>
    {{ content | safe }}
    <script src="https://useishara.com/w.js" data-site="pk_…" defer></script>
  </body>
</html>
```

3. Make it every page’s default layout with a global data file. Pages can still set their own layout in front matter:

```
export default "base.njk";
```

4. Build and deploy the site.
5. Open your site. Back on the **Install** page, **Check it’s live** turns into **The widget is live** as soon as the widget loads. Then open the **Reviewer link** from the same page: only people who open it see **Leave a note**.

## Good to know

- Nunjucks escapes `{{ }}` values, which is why layouts use `{{ content | safe }}`, but a tag you type into the layout is output exactly as written.
- To use the layout for one folder only, set it in a directory data file instead, such as `posts/posts.json`.

Checked against the official docs on 2026-11-12: [Eleventy: layouts](https://www.11ty.dev/docs/layouts/), [Eleventy: global data files](https://www.11ty.dev/docs/data-global/), [Eleventy: template and directory data files](https://www.11ty.dev/docs/data-template-dir/), [Eleventy: Nunjucks](https://www.11ty.dev/docs/languages/nunjucks/).
