Integrations and plugins
The Stainless Docs Platform is built on top of Astro, so you can take advantage of a broad ecosystem of existing Astro integrations to extend and enhance the functionality of your site.
We also provide experimental support for using Starlight plugins.
Astro integrations
Section titled “Astro integrations”The Stainless Docs Platform supports most Astro integrations. If you’re hosting your site with Stainless, the integrations you add must support a static output target.
To add an Astro integration, add it to the integrations array in astro.config.ts file alongside the stainlessDocs integration.
import { defineConfig } from "astro/config";import { generateAPIReferenceItems, stainlessDocs,} from "@stainless-api/docs";
// https://astro.build/configexport default defineConfig({ integrations: [ stainlessDocs({ ... }), anotherIntegration(), ],});Confirmed working integrations
Section titled “Confirmed working integrations”Below is a non-exhaustive list of the integrations we’ve confirmed work with the Stainless Docs Platform:
If you want to use an integration not listed above we encourage you to give it a try. Chances are it will work, but if it doesn’t please let us know!
Starlight plugins (experimental)
Section titled “Starlight plugins (experimental)”The Stainless Docs Platform currently uses Starlight under the hood and has experimental support for Starlight plugins.
To add a Starlight plugin to your site, first import it at the top of your astro.config.ts file, then add it to the experimental.starlightCompat.plugins array inside your stainlessDocs integration.
Here’s an example that shows how to add the starlight-links-validator plugin:
import { defineConfig } from "astro/config";import { stainlessDocs } from "@stainless-api/docs";import starlightLinksValidator from "starlight-links-validator";
export default defineConfig({ integrations: [ stainlessDocs({ title: "My Docs", experimental: { starlightCompat: { plugins: [starlightLinksValidator()], }, }, }), ],});