diff --git a/docs.json b/docs.json index 912c04624..a0a4726ef 100644 --- a/docs.json +++ b/docs.json @@ -2487,8 +2487,7 @@ "seo": { "indexing": "all", "metatags": { - "canonical": "https://upstash.com/docs", - "context7-ask": "This site publishes a search endpoint at https://context7.com/api/v2/ask?siteKey=ask_4cf2adc7846aa874f833b068. Append &query= to receive matching excerpts from this site's pages with their URLs. If nothing matches, the response says so." + "canonical": "https://upstash.com/docs" } }, "footer": { diff --git a/llms-full.txt b/llms-full.txt index 7066c872e..b49c8796b 100644 --- a/llms-full.txt +++ b/llms-full.txt @@ -4,6 +4,10 @@ Upstash also provides an MCP server (/docs/agent-resources/mcp) to manage and debug your Upstash resources directly from an agent, and an agent-friendly CLI (/docs/agent-resources/cli) for your terminal or CI/CD pipelines. +## Search + +Search these docs: GET https://upstash.com/docs/search?q= returns JSON { results: [{ href, title, heading, snippet, tab }] }. Append .md to any page href for its markdown. + # README Source: https://upstash.com/docs/README diff --git a/llms.txt b/llms.txt index 0b98a79ec..3b854242a 100644 --- a/llms.txt +++ b/llms.txt @@ -6,6 +6,10 @@ Upstash also provides an MCP server (/docs/agent-resources/mcp) to manage and debug your Upstash resources directly from an agent, and an agent-friendly CLI (/docs/agent-resources/cli) for your terminal or CI/CD pipelines. +## Search + +Search these docs: GET https://upstash.com/docs/search?q= returns JSON { results: [{ href, title, heading, snippet, tab }] }. Append .md to any page href for its markdown. + ## Docs - [README](https://upstash.com/docs/README.md) diff --git a/llms/src/build.ts b/llms/src/build.ts index 833f7337b..c9c5399b2 100644 --- a/llms/src/build.ts +++ b/llms/src/build.ts @@ -57,6 +57,15 @@ const PREAMBLE = ` Upstash also provides an MCP server (/docs/agent-resources/mcp) to manage and debug your Upstash resources directly from an agent, and an agent-friendly CLI (/docs/agent-resources/cli) for your terminal or CI/CD pipelines. `; +/** + * The Docs7 search every Docs7 site serves, in the same words as the llms.txt + * Docs7 generates. This custom file replaces that one, so it lists the search + * itself. + */ +const SEARCH_SECTION = `## Search + +Search these docs: GET ${SITE_URL}/search?q= returns JSON { results: [{ href, title, heading, snippet, tab }] }. Append .md to any page href for its markdown.`; + interface Entry { title: string; /** Site-relative path without leading slash, e.g. `agent-resources/cli`. */ @@ -167,6 +176,7 @@ function addOrphanMdxFiles(): void { function writeLlmsTxt(): void { const lines: string[] = ["# Upstash Documentation", ""]; lines.push(PREAMBLE, ""); + lines.push(SEARCH_SECTION, ""); lines.push("## Docs", ""); for (const e of entries) { const url = `${SITE_URL}/${e.path}.md`; @@ -207,6 +217,7 @@ function writeLlmsFullTxt(): void { // visually separated from neighbours. const chunks: string[] = []; chunks.push(`${PREAMBLE}\n\n`); + chunks.push(`${SEARCH_SECTION}\n\n`); for (const e of entries) { if (isExcludedFromFullTxt(e.path)) { const url = `${SITE_URL}/${e.path}.md`;