Skip to content
This repository was archived by the owner on Oct 27, 2026. It is now read-only.
Draft
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
5 changes: 0 additions & 5 deletions .env.local.example
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,5 @@ OPENAI_API_KEY=
# Falls back to OPENAI_API_KEY if not set
ANTHROPIC_API_KEY=

# Algolia search (search API key is public/read-only)
NEXT_PUBLIC_ALGOLIA_APP_ID=
NEXT_PUBLIC_ALGOLIA_SEARCH_API_KEY=
NEXT_PUBLIC_ALGOLIA_INDEX_NAME=

# Required for Contact Sales form submission (n8n → Attio pipeline)
NEXT_PUBLIC_ATTIO_WEBHOOK_URL=
67 changes: 0 additions & 67 deletions .github/workflows/algolia-reindex.yml

This file was deleted.

56 changes: 0 additions & 56 deletions .github/workflows/sync-crawler-config.yml

This file was deleted.

2 changes: 1 addition & 1 deletion CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Run a script directly with `bun scripts/<name>.ts` (never `tsx`, `npx`, `pnpm`,
- **`lib/`** — fumadocs source/layout config, toolkit data/slug/static-param helpers, integration catalog, glossary remark plugin, `remark-nextra-compat`, config and dictionaries.
- **`data/partner-toolkits.ts`** — Hand-authored partner integrations (no toolkit JSON).
- **`toolkit-docs-generator/`** — Generates MCP toolkit JSON into `toolkit-docs-generator/data/toolkits/`; `scripts/sync-toolkit-sidebar.ts` emits the nine integration category `meta.json` files.
- **`scripts/`** — Build/CI scripts (Vale style fixes/reviews, redirect checking, meta.json validation, internal link updates, llms.txt generation, Algolia crawler config sync).
- **`scripts/`** — Build/CI scripts (Vale style fixes/reviews, redirect checking, meta.json validation, internal link updates, llms.txt generation).
- **`tests/`** — Vitest tests (broken links, internal links, frontmatter, sitemap, toolkit data, navigation contracts). `tests/helpers/content-paths.ts` maps content files ↔ URLs.
- **`redirects.ts`** — Redirect data module (~215 rules) imported by `next.config.ts`, the redirect checker, and tests.
- **`source.config.ts`** — fumadocs-mdx config (frontmatter schema, Shiki transformers). `proxy.ts` redirects locale-less and non-English paths to `/en`.
Expand Down
82 changes: 0 additions & 82 deletions algolia/README.md

This file was deleted.

101 changes: 0 additions & 101 deletions algolia/crawler-config.js

This file was deleted.

33 changes: 33 additions & 0 deletions app/api/search/route.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
import { builtinSearch } from "@/lib/builtin-search";

// Results depend only on the query string and the deployed content, so a CDN
// can cache them. Vercel keys its cache per deployment, so a new deploy never
// serves results from an older index.
const CACHE_CONTROL = "public, s-maxage=3600, stale-while-revalidate=86400";

// Real queries are short, but people paste error messages and ask full
// questions, so allow plenty. Anything longer is cut rather than rejected:
// the extra words add little signal, and the dialog never shows an error.
// Cutting also keeps one cache entry per query instead of one per paste.
const MAX_QUERY_LENGTH = 200;

function limitQueryLength(request: Request): Request {
const url = new URL(request.url);
const query = url.searchParams.get("query");
if (query === null || query.length <= MAX_QUERY_LENGTH) {
return request;
}
url.searchParams.set("query", query.slice(0, MAX_QUERY_LENGTH).trimEnd());
return new Request(url, request);
}

export async function GET(request: Request) {
const response = await builtinSearch.GET(limitQueryLength(request));
const headers = new Headers(response.headers);
headers.set("Cache-Control", CACHE_CONTROL);
return new Response(response.body, {
status: response.status,
statusText: response.statusText,
headers,
});
}
8 changes: 2 additions & 6 deletions app/global.css
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@
margin-inline-end: 3.5rem !important;
}

.nextra-navbar nav > div:has(.algolia-search-button) {
.nextra-navbar nav > div:has(.search-button) {
order: -1;
margin-inline: 1rem auto;
}
Expand Down Expand Up @@ -418,9 +418,7 @@ html.dark[data-page-kind="toolkit"] [data-callout][data-type="idea"] {
border-color: rgb(34 197 94 / 0.4) !important;
}

/* Algolia search hit highlight — brand color */
.ais-Highlight-highlighted,
.ais-Snippet-highlighted,
/* Search hit highlight: brand color */
[data-search-dialog] mark {
font-style: normal;
font-weight: 600;
Expand All @@ -429,8 +427,6 @@ html.dark[data-page-kind="toolkit"] [data-callout][data-type="idea"] {
border-radius: 2px;
}

.dark .ais-Highlight-highlighted,
.dark .ais-Snippet-highlighted,
.dark [data-search-dialog] mark {
background: color-mix(in oklch, var(--primary) 20%, transparent);
}
Expand Down
Loading
Loading