Search and SEO
Configure search prompts, indexing rules, metadata, social cards, and cookie consent in docs.json.
Search
json{ "search": { "prompt": "Ask a question or search the docs...", "hotkey": "k", "placeholder": "Search documentation" }}
| Field | Type | Default |
|---|---|---|
prompt | string | none |
hotkey | string | k |
placeholder | string | Search documentation... |
Keep the prompt task-oriented. Good prompts mention what readers can actually ask or find.
SEO
json{ "seo": { "indexing": "navigable", "ogImage": "/images/og-default.png", "twitterHandle": "@example", "metatags": { "og:site_name": "Acme Docs" } }}
| Field | Type | Default | Notes |
|---|---|---|---|
indexing | navigable | all | navigable | Index only pages present in nav, or every file in the repo |
noindex | boolean | false | Useful for staging or private previews |
ogImage | string | auto | Default social share image |
twitterHandle | string | none | Used for twitter:site metadata |
metatags | record<string,string> | {} | Extra global meta tags |
indexing: "navigable" is the safer default. It prevents orphaned draft pages from quietly getting indexed.
Metadata timestamps
If you want page-level freshness signals, enable metadata timestamps:
json{ "metadata": { "timestamp": true }}
Then set timestamp or lastModifiedAt in page frontmatter for pages where recency matters.
Cookie consent
json{ "cookieConsent": { "enabled": true, "privacyPolicyUrl": "https://example.com/privacy", "position": "bottom", "theme": "light" }}
Use this when analytics or marketing scripts require consent in your deployment jurisdiction.
Practical checklist
- Make sure the most important pages are in navigation.
- Add an
ogImagebefore launch, even if it is a single default asset. - Turn on
metadata.timestampfor changelog, pricing, and policy-heavy pages. - Use
noindex: truefor staging and short-lived previews.