Skip to content

Configuration

The Starlight Cooler Credit plugin can be configured inside the astro.config.mjs configuration file of your project:

astro.config.mjs
import starlight from "@astrojs/starlight";
import { defineConfig } from "astro/config";
import starlightCoolerCredit from "starlight-cooler-credit";
export default defineConfig({
integrations: [
starlight({
plugins: [
starlightCoolerCredit({
// Configuration options go here.
}),
],
title: "My Docs",
}),
],
});

Configuration options

The Starlight Cooler Credit plugin accepts the following configuration options:

credit

Type:

"Astro" |
"Starlight" |
"Starlight Blog" |
{
title: string | Record<string, string>;
href: string;
description?: string | Record<string, string> | undefined;
}

Default: "Starlight"

The credit option allows you to configure the credit text displayed in the table of contents of the Starlight website. There are three preconfigured options: "Astro", "Starlight", and "Starlight Blog". You can also provide a custom object to configure the credit text for each locale.

Here is an example for a custom configuration:

starlightCoolerCredit({
credit: {
title: {
en: "Built with Astro",
de: "Erstellt mit Astro",
},
href: "https://docs.astro.build/",
description: {
en: "Want to build your own static website?",
de: "Willst du deine eigene statische Website erstellen?",
},
},
}),

Preconfigured options

The Astro, Starlight, and Starlight Blog options are preconfigured and can be used without any additional configuration.

Arabic, Chinese, English, French, German, Italian, Japanese, Korean, Russian, and Spanish translated UI strings are provided out of the box.

To provide translations for additional languages you support — or override the default ones — check the “Translate Starlight’s UI” guide in the Starlight documentation.

These are the English defaults of the existing strings Starlight Cooler Credit ships with:

{
"starlightCoolerCredit.starlight.description": "Do you want to build your own docs? →",
"starlightCoolerCredit.astro.title": "Built with Astro",
"starlightCoolerCredit.astro.description": "Want to build your own static website? →",
"starlightCoolerCredit.starlight-blog.title": "Built with Starlight Blog",
"starlightCoolerCredit.starlight-blog.description": "Want to build your own Starlight blog? →"
}

showImage

Type: boolean
Default: true

The showImage option allows you to configure whether the image in the Cooler Credit component should be displayed or not. If set to false, the image will not be displayed.

customImage

Type: string
Default: An image of Houston showing interest.

The customImage option allows you to provide a custom image path for the Cooler Credit component. If provided, the default image will be replaced with the custom image. The configuration option showImage must be set to true for the image to be displayed.

This option accepts a relative path to an image in your project:

starlightCoolerCredit({
customImage: "./src/assets/rainsberger.ca.webp",
}),

customImageAlt

Type: string
Default: "A face with two large white eyes and a small round mouth, creating a 'WOW' expression. This character, named Houston, sticks out at the bottom of the card to show interest."

Mit der Option customImageAlt kannst du einen alternativen Text für das Bild in der Cooler Credit Komponente angeben. Wenn du ihn nicht angibst, wird der Standard-Alt-Text verwendet.

Der alternative Text kann nur für eine Sprache eingestellt werden.