*.md, *.mdx, and *.rst files plus READMEs — ideal for docs-as-code, architecture decision records, and changelogs.
Set up a repository source
1
Create an access token (private repos only)
Public repositories need no credentials. For private repos, create a read-scoped personal access token —
ghp_… for GitHub, glpat-… for GitLab.2
Add the source
In the dashboard, open Project → Sources → Add source and choose GitHub or GitLab. Fill in:
3
Save the webhook secret
When the source is created, BeforeQuery shows a webhook URL and webhook secret — copy them now (the secret is used for push-triggered sync below). The first sync starts automatically.
Sync on every push
Add a webhook in your repo settings so pushes trigger incremental reindexing — only changed files are re-processed:- GitHub
- GitLab
In the repo, go to Settings → Webhooks → Add webhook:
- Payload URL: the webhook URL shown at source creation (
…/webhooks/sources/github/<sourceId>) - Content type:
application/json - Secret: the source’s webhook secret
- Events: push
X-Hub-Signature-256 HMAC on every delivery.Versioned docs from branches
To serve version-scoped answers (e.g.v1 vs v2 docs), add one source per branch and set a version label on each. Combined with source groups, a widget or API caller can be scoped to exactly one version.
Troubleshooting
- Files missing from the index? Only markdown-family files are indexed — and check your include paths aren’t excluding them.
- Webhook deliveries failing? The secret in your repo settings must match the source’s webhook secret exactly; re-check for whitespace.
- Private repo sync failing? The token expired or lost read scope — rotate it and update the source.