[ Install guide ]
Feedback widget for static HTML sites
If your site has a body tag, it can have the widget. Paste one line and you are done.
Updated
Before you start
- Sign in with GitHub and install the feedback2code GitHub App. Choose the repository that holds the code of the site.
- Open the repository in the dashboard, go to Configure and add the domains the widget may run on.
- Copy the snippet from Embed Widget. It contains your widget ID.
Add the widget
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>My site</title>
</head>
<body>
<h1>Hello</h1>
<script src="https://www.feedback2code.dev/widget/YOUR_WIDGET_ID" async></script>
</body>
</html>Replace YOUR_WIDGET_ID with the ID from your dashboard. Put the tag before the closing body tag on every page that should show the widget. With a static site generator such as Hugo, Jekyll or Eleventy, add it to the base layout or a footer partial once.
What the agent can change
The agent works on the repository that holds the site: HTML, CSS, JavaScript, templates and Markdown. The site has to be in a GitHub repository, public or private.
Every change arrives as a pull request. Nothing is merged or deployed until you do it, so your usual review and deployment stay as they are.
Good to know
- The script loads asynchronously, so it does not delay the page.
- With a Content-Security-Policy, allow https://www.feedback2code.dev in script-src and frame-src.
- On GitHub Pages, Netlify or similar hosts, authorize your own subdomain, for example your-project.github.io, not the hosting domain as a whole.
Test it
- Deploy the change and open the site on an authorized domain.
- Click the button at the bottom right and send one small, concrete request.
- Open your dashboard. The submission starts as coding and turns to awaiting review once the pull request is open.
What a submission contains and how the plans differ is described on the page about the website feedback widget.
Other setups
- Feedback widget for Next.js
- Feedback widget for React apps
- Feedback widget for Vue and Nuxt
- Feedback widget for Astro
- Feedback widget for WordPress themes
- Feedback widget for Shopify themes
Questions and answers
Do I need a build tool?
No. The widget is a plain script tag and works on hand-written HTML.
Does it work with Hugo, Jekyll or Eleventy?
Yes. Add the script tag to the base template so every generated page includes it.
Does it work on GitHub Pages?
Yes. The site is already in a GitHub repository, which is exactly what the agent needs. Merging the pull request publishes the change through your usual Pages build.