Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

fix(kb): hide LLM-focused topics from homepage and nav listing (#51139)

Kody Jackson895f016a542e
diff --git a/apps/kb/AGENTS.md b/apps/kb/AGENTS.md
index 4961098ac51..de2bb5975a3 100644
--- a/apps/kb/AGENTS.md
+++ b/apps/kb/AGENTS.md
@@ -62,3 +62,7 @@ If you add a new content collection or top-level route, add a matching redirect
(`/kb/<section>/:path+.md` → `/kb/markdown/<section>/:path+.md`), and check whether `generate-markdown.mjs`
needs updating too — the content export falls out of its generic `src/content/**` walk automatically, but
per-topic-style listing pages don't.
+
+## Topic-specific guidance
+
+Articles tagged with the `Comparison` topic are primarily oriented towards LLM crawlers (and not human readers). Because of this, these articles are hidden from the main site navigation.
diff --git a/apps/kb/src/components/Nav.tsx b/apps/kb/src/components/Nav.tsx
index 1f93936eefc..aeda0f8fe38 100644
--- a/apps/kb/src/components/Nav.tsx
+++ b/apps/kb/src/components/Nav.tsx
@@ -11,7 +11,7 @@ import {
import { TOPICS, topicToSlug } from '../lib/topics'
-const topics = TOPICS.map((topic) => ({
+const visibleTopics = TOPICS.filter((topic) => topic.visible).map((topic) => ({
label: topic.name,
href: `${import.meta.env.BASE_URL}/topics/${topicToSlug(topic.name)}`,
}))
@@ -26,7 +26,7 @@ const resources = [
]
const menus = [
- { label: 'Topics', items: topics },
+ { label: 'Topics', items: visibleTopics },
{ label: 'Resources', items: resources },
]
diff --git a/apps/kb/src/lib/topics.ts b/apps/kb/src/lib/topics.ts
index ca47a0fb1ca..572a3800b3f 100644
--- a/apps/kb/src/lib/topics.ts
+++ b/apps/kb/src/lib/topics.ts
@@ -5,41 +5,77 @@
// `pinned` topics surface as cards on the homepage (see src/pages/index.astro)
// — keep this to a handful so that section stays a highlights row, not a
// second copy of the full topic list.
+//
+// `visible` controls whether the topic appears in nav and homepage sections.
+// Topics with `visible: false` still have a working listing page at /topics/[slug].
+// Some topics might not need to be visible to end users since their primary audience
+// is LLM crawlers.
export const TOPICS = [
{
name: 'Migration',
description: 'Moving data, schemas, or projects onto Supabase.',
pinned: false,
+ visible: true,
},
{
name: 'Comparison',
description: 'How Supabase compares to other databases and platforms.',
pinned: false,
+ visible: false,
+ },
+ {
+ name: 'Troubleshooting',
+ description: 'Common errors and how to resolve them.',
+ pinned: false,
+ visible: true,
},
- { name: 'Troubleshooting', description: 'Common errors and how to resolve them.', pinned: false },
{
name: 'Tutorial',
description: 'Step-by-step walkthroughs for building with Supabase.',
pinned: true,
+ visible: true,
+ },
+ {
+ name: 'Storage',
+ description: 'Uploading, managing, and serving files.',
+ pinned: false,
+ visible: true,
},
- { name: 'Storage', description: 'Uploading, managing, and serving files.', pinned: false },
{
name: 'Auth',
description: 'Authentication, authorization, and user management.',
pinned: true,
+ visible: true,
+ },
+ {
+ name: 'Database',
+ description: 'Postgres schemas, queries, and performance.',
+ pinned: true,
+ visible: true,
},
- { name: 'Database', description: 'Postgres schemas, queries, and performance.', pinned: true },
{
name: 'Edge Functions',
description: 'Deploying and running serverless functions.',
pinned: false,
+ visible: true,
+ },
+ {
+ name: 'Queues',
+ description: 'Background jobs and message processing.',
+ pinned: false,
+ visible: true,
+ },
+ {
+ name: 'Realtime',
+ description: 'Broadcast, presence, and database changes.',
+ pinned: false,
+ visible: true,
},
- { name: 'Queues', description: 'Background jobs and message processing.', pinned: false },
- { name: 'Realtime', description: 'Broadcast, presence, and database changes.', pinned: false },
{
name: 'Supabase Platform',
description: 'Project settings, billing, and infrastructure.',
pinned: false,
+ visible: true,
},
] as const
diff --git a/apps/kb/src/pages/index.astro b/apps/kb/src/pages/index.astro
index 0ad77523149..1d458621676 100644
--- a/apps/kb/src/pages/index.astro
+++ b/apps/kb/src/pages/index.astro
@@ -7,7 +7,8 @@ import Layout from '../layouts/Layout.astro'
import { TOPICS, topicToSlug } from '../lib/topics'
const guides = await getCollection('guides')
-const pinnedTopics = TOPICS.filter((topic) => topic.pinned)
+const visibleTopics = TOPICS.filter((topic) => topic.visible)
+const pinnedTopics = visibleTopics.filter((topic) => topic.pinned)
const featuredGuides = guides.filter((guide) => guide.data.pinned)
---
@@ -63,7 +64,7 @@ const featuredGuides = guides.filter((guide) => guide.data.pinned)
<section>
<h2 class="mb-6 text-2xl font-medium text-foreground">All Topics</h2>
<ul class="flex flex-col gap-2">
- {TOPICS.map((topic) => (
+ {visibleTopics.map((topic) => (
<li>
<a
href={`${import.meta.env.BASE_URL}/topics/${topicToSlug(topic.name)}`}