Demo
The credit line at the bottom of this page is the live rendering for whoever authored this source file. Right now that’s one person, so the icon is the single-person glyph. The block below shows what two or more contributors look like. The names (Ada Lovelace, Grace Hopper, Linus Torvalds) are hardcoded in this preview, not produced by the component. In a real site the names come from git blame.
Multiple contributors
Section titled “Multiple contributors”With two or more contributors, the icon switches to the multi-people variant:
Contributors
Ada Lovelace, Grace Hopper, and Linus Torvalds
Ada Lovelace, Grace Hopper, and Linus Torvalds
Custom icon
Section titled “Custom icon”The plugin’s credit line uses a fixed glyph. For a Starlight <Icon>, inline SVG, or any other custom icon, set overrideFooter: false and pass markup into the icon slot in your own Footer:
starlight({ components: { Footer: './src/overrides/Footer.astro' }, plugins: [starlightGitContributors({ overrideFooter: false })],});Starlight <Icon>
Section titled “Starlight <Icon>”---import Default from '@astrojs/starlight/components/Footer.astro';import PageContributors from 'starlight-git-contributors/PageContributors.astro';import { Icon } from '@astrojs/starlight/components';---
<Default><slot /></Default><p> <PageContributors top={5}> <Icon slot="icon" name="user" /> </PageContributors></p>Inline SVG
Section titled “Inline SVG”---import Default from '@astrojs/starlight/components/Footer.astro';import PageContributors from 'starlight-git-contributors/PageContributors.astro';---
<Default><slot /></Default><p> <PageContributors top={5}> <svg slot="icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"> <path d="M12 2 L2 22 H22 Z" /> </svg> </PageContributors></p>sitapix