Install guides (31)
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 (set when you add the site)
- Time
- About 3 minutes
Steps
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:
<script src="https://useishara.com/w.js" data-site="pk_…" defer></script>
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>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";
Build and deploy the site.
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.
Next
Once reviewers leave notes, your coding agent can apply them. The widget’s options (language, position, colour, launcher) are in the docs.