Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions docs.json
Original file line number Diff line number Diff line change
Expand Up @@ -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=<URL-encoded question> 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": {
Expand Down
4 changes: 4 additions & 0 deletions llms-full.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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.
</Tip>

## Search

Search these docs: GET https://upstash.com/docs/search?q=<query> returns JSON { results: [{ href, title, heading, snippet, tab }] }. Append .md to any page href for its markdown.

# README
Source: https://upstash.com/docs/README

Expand Down
4 changes: 4 additions & 0 deletions llms.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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.
</Tip>

## Search

Search these docs: GET https://upstash.com/docs/search?q=<query> 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)
Expand Down
11 changes: 11 additions & 0 deletions llms/src/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,15 @@ const PREAMBLE = `<Tip>
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.
</Tip>`;

/**
* 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=<query> 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`. */
Expand Down Expand Up @@ -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`;
Expand Down Expand Up @@ -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`;
Expand Down
Loading