IsharaBeta
Install guides (31)

Add Ishara to Hugo

Add the feedback widget to a Hugo site by pasting one script tag into the footer partial that your base template includes on every page.

Where it goes
Your footer partial, e.g. layouts/_partials/footer.html
Allowed domains
Your own domain (set when you add the site)
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. Paste the line at the end of your footer partial, layouts/_partials/footer.html (create it if your site doesn’t have one):

    layouts/_partials/footer.html
    <footer><!-- your footer --></footer>
    <script src="https://useishara.com/w.js" data-site="pk_…" defer></script>
  3. Make sure your base template, layouts/baseof.html, includes the partial at the end of <body>. Every page built on it then gets the widget:

    layouts/baseof.html
    <!DOCTYPE html>
    <html lang="{{ site.Language.Locale }}">
    <head>{{ partial "head.html" . }}</head>
    <body>
      <header>{{ partial "header.html" . }}</header>
      <main>{{ block "main" . }}{{ end }}</main>
      {{ partial "footer.html" . }}
    </body>
    </html>
  4. Build the site with hugo build and deploy it.

  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

  • Hugo outputs HTML you type into a template exactly as written; it only escapes the values in {{ }} actions.
  • Current Hugo docs use layouts/baseof.html and layouts/_partials/. If your site or theme keeps its templates elsewhere, add the line to the partial or base template it actually uses.

Next

Once reviewers leave notes, your coding agent can apply them. The widget’s options (language, position, colour, launcher) are in the docs.