feat(docs-site): add starlight-plugin-icons, use real Gitea logo in header
The header social link used Starlight's generic `code-branch` icon. Wires up starlight-plugin-icons + UnoCSS (Iconify) and overrides SocialIcons to render `pajamas:gitea` for the Gitea link instead, while falling back to Starlight's default icon set for anything else. Sidebar and codeblock icon support are enabled but unused for now.
This commit is contained in:
+49
-39
@@ -1,5 +1,6 @@
|
||||
import { defineConfig } from 'astro/config';
|
||||
import starlight from '@astrojs/starlight';
|
||||
import UnoCSS from 'unocss/astro';
|
||||
import Icons from 'starlight-plugin-icons';
|
||||
import starlightLinksValidator from 'starlight-links-validator';
|
||||
import starlightCatppuccin from '@catppuccin/starlight';
|
||||
import starlightLlmsTxt from 'starlight-llms-txt';
|
||||
@@ -9,45 +10,54 @@ export default defineConfig({
|
||||
prerenderConflictBehavior: 'ignore',
|
||||
site: 'https://fish.rootiest.fyi',
|
||||
integrations: [
|
||||
starlight({
|
||||
title: 'Rootiest Fish Config',
|
||||
description: 'Reference manual for the rootiest fish configuration.',
|
||||
favicon: '/favicon.svg',
|
||||
logo: {
|
||||
src: './src/assets/logo.svg',
|
||||
UnoCSS(),
|
||||
...Icons({
|
||||
sidebar: true,
|
||||
codeblock: true,
|
||||
extractSafelist: true,
|
||||
starlight: {
|
||||
title: 'Rootiest Fish Config',
|
||||
description: 'Reference manual for the rootiest fish configuration.',
|
||||
favicon: '/favicon.svg',
|
||||
logo: {
|
||||
src: './src/assets/logo.svg',
|
||||
},
|
||||
social: [
|
||||
{
|
||||
icon: 'code-branch',
|
||||
label: 'Gitea',
|
||||
href: 'https://git.rootiest.dev/rootiest/fish-config',
|
||||
},
|
||||
],
|
||||
components: {
|
||||
SocialIcons: './src/components/starlight/SocialIcons.astro',
|
||||
},
|
||||
head: [
|
||||
{
|
||||
tag: 'script',
|
||||
content: 'document.addEventListener("DOMContentLoaded", () => { document.querySelectorAll("starlight-file-tree").forEach(tree => { tree.querySelectorAll("details").forEach((d, i) => { if (i !== 0) d.removeAttribute("open"); }); }); });',
|
||||
},
|
||||
],
|
||||
plugins: [
|
||||
starlightLinksValidator(),
|
||||
starlightCatppuccin({
|
||||
dark: { flavor: "mocha", accent: "green" },
|
||||
light: { flavor: "latte", accent: "sky" },
|
||||
}),
|
||||
starlightLlmsTxt(),
|
||||
],
|
||||
expressiveCode: {
|
||||
// Shiki ships both Catppuccin flavours; Starlight picks by the
|
||||
// reader's colour scheme, matching the palette in catppuccin.css.
|
||||
themes: ['catppuccin-mocha', 'catppuccin-latte'],
|
||||
styleOverrides: {
|
||||
borderRadius: '0.4rem',
|
||||
borderColor: 'var(--sl-color-gray-5)',
|
||||
codeFontSize: '0.875rem',
|
||||
},
|
||||
},
|
||||
sidebar,
|
||||
},
|
||||
social: [
|
||||
{
|
||||
icon: 'code-branch',
|
||||
label: 'Gitea',
|
||||
href: 'https://git.rootiest.dev/rootiest/fish-config',
|
||||
},
|
||||
],
|
||||
head: [
|
||||
{
|
||||
tag: 'script',
|
||||
content: 'document.addEventListener("DOMContentLoaded", () => { document.querySelectorAll("starlight-file-tree").forEach(tree => { tree.querySelectorAll("details").forEach((d, i) => { if (i !== 0) d.removeAttribute("open"); }); }); });',
|
||||
},
|
||||
],
|
||||
plugins: [
|
||||
starlightLinksValidator(),
|
||||
starlightCatppuccin({
|
||||
dark: { flavor: "mocha", accent: "green" },
|
||||
light: { flavor: "latte", accent: "sky" },
|
||||
}),
|
||||
starlightLlmsTxt(),
|
||||
],
|
||||
expressiveCode: {
|
||||
// Shiki ships both Catppuccin flavours; Starlight picks by the
|
||||
// reader's colour scheme, matching the palette in catppuccin.css.
|
||||
themes: ['catppuccin-mocha', 'catppuccin-latte'],
|
||||
styleOverrides: {
|
||||
borderRadius: '0.4rem',
|
||||
borderColor: 'var(--sl-color-gray-5)',
|
||||
codeFontSize: '0.875rem',
|
||||
},
|
||||
},
|
||||
sidebar,
|
||||
}),
|
||||
],
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user