Configuration
The Starlight Cooler Credit plugin can be configured inside the astro.config.mjs configuration file of your project:
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
Section titled “Configuration options”The Starlight Cooler Credit plugin accepts the following configuration options:
credit
Section titled “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.
Please note that if you want to provide credit text for each locale, that there has to be at least the locale value of your defaultLocale configured.
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
Section titled “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
Section titled “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
Section titled “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",}),It is not possible to provide an external image URL.
customImageAlt
Section titled “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."
With the customImageAlt option, you can specify alternative text for the image in the Cooler Credit component.
The alternative text can only be set for one language.
This option is required if customImage is specified.