Embed on multiple sites
One Knoku project can power the widget on multiple hosts. Common examples are production and staging, docs and marketing, or several locale domains.
Add every host
Open Project -> Settings -> Domains and add every host where the widget should mount.
Examples:
example.com
docs.example.com
https://docs.example.com
http://localhost:3000Bare hosts and full origins are both accepted. Use a full origin when scheme or port matters. Wildcards are not supported.
The widget config request is rejected when the browser origin does not match an allowed entry.
Citation links across hosts
Most sources already carry absolute URLs. Website crawls use the live page URL; GitHub repo sync uses the file permalink.
When a source only has a relative path, Knoku prefixes it with the first allowed domain in Domains. If the widget runs on example.com but docs live on docs.example.com, list docs.example.com first so a path like /installation resolves to https://docs.example.com/installation.
For npm embeds, pass primaryDomain in initKnokuWidget() when you need an explicit override.
How source URLs resolve
| Source | Citation behavior |
|---|---|
| Website crawl | Uses the crawled page URL |
| GitHub repo sync | Uses the GitHub file URL |
| GitHub Discussions / Issues / PRs | Uses the GitHub permalink |
| Uploaded files | No public URL is generated |
Local development
Add your local origin when testing:
http://localhost:3000Localhost ports are treated leniently by the backend once localhost is configured, but adding the exact origin keeps the setup clear for your team.