head option to every page. You add the widget there.
Before you start
- Your website widget. Kelu makes one for you when you create a knowledge base. Find it under Integrations → Website widget. You need the widget id and public key from the code on its Install tab.
- Your site’s address on the widget’s Sites it works on list (Install tab).
Add the widget
The widget’s Install tab shows these same steps with your code already filled in.Open astro.config.mjs
It is at the root of your project. The
starlight() integration is set up there.Add the widget to head
Add Replace
head inside starlight({ ... }). If head already exists, add the entry to it.astro.config.mjs
YOUR_WIDGET_ID and kl_pk_... with the values from your widget’s Install tab.