From c40500ce66adbc33d5451fb4ba54a11df8b69dab Mon Sep 17 00:00:00 2001 From: Alec Henninger Date: Thu, 8 Jan 2026 13:45:22 -0500 Subject: [PATCH 1/2] Simplify SdkExamples usage Use a single content collection with filtering, and rename the getting started examples as "getting-started" to avoid recursive naming. --- src/components/SdkExamples.astro | 8 +++++--- src/content.config.ts | 8 +------- .../docs/building-with-kessel/how-to/enable-tls.mdx | 2 +- src/content/docs/start-here/getting-started.mdx | 2 +- src/content/sdk-examples/{ => getting-started}/curl.md | 0 src/content/sdk-examples/{ => getting-started}/go.md | 0 src/content/sdk-examples/{ => getting-started}/grpcurl.md | 0 src/content/sdk-examples/{ => getting-started}/java.md | 0 .../sdk-examples/{ => getting-started}/javascript.md | 0 src/content/sdk-examples/{ => getting-started}/python.md | 0 src/content/sdk-examples/{ => getting-started}/ruby.md | 0 src/content/{tls-examples => sdk-examples/tls}/go.md | 0 src/content/{tls-examples => sdk-examples/tls}/python.md | 0 13 files changed, 8 insertions(+), 12 deletions(-) rename src/content/sdk-examples/{ => getting-started}/curl.md (100%) rename src/content/sdk-examples/{ => getting-started}/go.md (100%) rename src/content/sdk-examples/{ => getting-started}/grpcurl.md (100%) rename src/content/sdk-examples/{ => getting-started}/java.md (100%) rename src/content/sdk-examples/{ => getting-started}/javascript.md (100%) rename src/content/sdk-examples/{ => getting-started}/python.md (100%) rename src/content/sdk-examples/{ => getting-started}/ruby.md (100%) rename src/content/{tls-examples => sdk-examples/tls}/go.md (100%) rename src/content/{tls-examples => sdk-examples/tls}/python.md (100%) diff --git a/src/components/SdkExamples.astro b/src/components/SdkExamples.astro index 07fe680..0a0cd79 100644 --- a/src/components/SdkExamples.astro +++ b/src/components/SdkExamples.astro @@ -3,12 +3,14 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; import { getCollection } from 'astro:content'; interface Props { - content: string; + subfolder: string; } -const { content } = Astro.props; +const { subfolder } = Astro.props; -const unorderedExamples = await getCollection(content); +const unorderedExamples = await getCollection('sdk-examples', ({ id }) => + id.startsWith(subfolder + '/') +); const orderedExamples = unorderedExamples.sort((a, b) => a.data.order - b.data.order); --- diff --git a/src/content.config.ts b/src/content.config.ts index 824ce8a..b8edc20 100644 --- a/src/content.config.ts +++ b/src/content.config.ts @@ -2,7 +2,7 @@ import { defineCollection } from 'astro:content'; import { docsSchema } from '@astrojs/starlight/schema'; import { z } from 'astro:content'; import { ClientPackageSchema } from './schemas/client-package'; -import {CodeExampleSchema} from "src/schemas/code-example.ts"; +import { CodeExampleSchema } from "./schemas/code-example"; const docs = defineCollection({ schema: docsSchema({ @@ -18,13 +18,7 @@ const sdkExamples = defineCollection({ schema: CodeExampleSchema, }) -const tlsExamples = defineCollection({ - type: 'content', - schema: CodeExampleSchema, -}) - export const collections = { docs, 'sdk-examples': sdkExamples, - 'tls-examples': tlsExamples, }; diff --git a/src/content/docs/building-with-kessel/how-to/enable-tls.mdx b/src/content/docs/building-with-kessel/how-to/enable-tls.mdx index 08577e2..eb23f13 100644 --- a/src/content/docs/building-with-kessel/how-to/enable-tls.mdx +++ b/src/content/docs/building-with-kessel/how-to/enable-tls.mdx @@ -34,4 +34,4 @@ This mounts the CA certificate at `/ca-certs/service-ca.crt`, which you can refe Below are complete examples showing how to configure TLS with OAuth 2.0 authentication in each supported language: - + diff --git a/src/content/docs/start-here/getting-started.mdx b/src/content/docs/start-here/getting-started.mdx index df2eaa4..92434d9 100644 --- a/src/content/docs/start-here/getting-started.mdx +++ b/src/content/docs/start-here/getting-started.mdx @@ -196,4 +196,4 @@ your local relations port is 9000. ### Report and Check Examples - \ No newline at end of file + diff --git a/src/content/sdk-examples/curl.md b/src/content/sdk-examples/getting-started/curl.md similarity index 100% rename from src/content/sdk-examples/curl.md rename to src/content/sdk-examples/getting-started/curl.md diff --git a/src/content/sdk-examples/go.md b/src/content/sdk-examples/getting-started/go.md similarity index 100% rename from src/content/sdk-examples/go.md rename to src/content/sdk-examples/getting-started/go.md diff --git a/src/content/sdk-examples/grpcurl.md b/src/content/sdk-examples/getting-started/grpcurl.md similarity index 100% rename from src/content/sdk-examples/grpcurl.md rename to src/content/sdk-examples/getting-started/grpcurl.md diff --git a/src/content/sdk-examples/java.md b/src/content/sdk-examples/getting-started/java.md similarity index 100% rename from src/content/sdk-examples/java.md rename to src/content/sdk-examples/getting-started/java.md diff --git a/src/content/sdk-examples/javascript.md b/src/content/sdk-examples/getting-started/javascript.md similarity index 100% rename from src/content/sdk-examples/javascript.md rename to src/content/sdk-examples/getting-started/javascript.md diff --git a/src/content/sdk-examples/python.md b/src/content/sdk-examples/getting-started/python.md similarity index 100% rename from src/content/sdk-examples/python.md rename to src/content/sdk-examples/getting-started/python.md diff --git a/src/content/sdk-examples/ruby.md b/src/content/sdk-examples/getting-started/ruby.md similarity index 100% rename from src/content/sdk-examples/ruby.md rename to src/content/sdk-examples/getting-started/ruby.md diff --git a/src/content/tls-examples/go.md b/src/content/sdk-examples/tls/go.md similarity index 100% rename from src/content/tls-examples/go.md rename to src/content/sdk-examples/tls/go.md diff --git a/src/content/tls-examples/python.md b/src/content/sdk-examples/tls/python.md similarity index 100% rename from src/content/tls-examples/python.md rename to src/content/sdk-examples/tls/python.md From 53c4c3267bbbebdc82aadd9ccfe9a8088a512eab Mon Sep 17 00:00:00 2001 From: Alec Henninger Date: Thu, 8 Jan 2026 13:57:28 -0500 Subject: [PATCH 2/2] Fix subfolder --- src/content/docs/start-here/getting-started.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/content/docs/start-here/getting-started.mdx b/src/content/docs/start-here/getting-started.mdx index b1a79e2..671c9ef 100644 --- a/src/content/docs/start-here/getting-started.mdx +++ b/src/content/docs/start-here/getting-started.mdx @@ -240,7 +240,7 @@ This results in that user having the access described by the role to that worksp ### Report and Check Examples - + ## Next steps and roadmap