mirror of
https://github.com/coleam00/Archon
synced 2026-04-21 13:37:41 +00:00
Starlight removes the `starlight-theme` localStorage key when the user selects "auto" mode. The old init script checked that key, so every navigation or refresh re-forced dark theme. Use a separate `archon-theme-init` sentinel that persists across theme changes. Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
58 lines
1.7 KiB
JavaScript
58 lines
1.7 KiB
JavaScript
import { defineConfig } from 'astro/config';
|
|
import starlight from '@astrojs/starlight';
|
|
|
|
export default defineConfig({
|
|
site: 'https://archon.diy',
|
|
integrations: [
|
|
starlight({
|
|
title: 'Archon',
|
|
favicon: '/favicon.png',
|
|
logo: {
|
|
src: './src/assets/logo.png',
|
|
alt: 'Archon',
|
|
},
|
|
description: 'AI workflow engine — package your coding workflows as YAML, run them anywhere.',
|
|
head: [
|
|
{
|
|
tag: 'script',
|
|
content: `if(!localStorage.getItem('archon-theme-init')){localStorage.setItem('archon-theme-init','1');localStorage.setItem('starlight-theme','dark');document.documentElement.dataset.theme='dark';}`,
|
|
},
|
|
],
|
|
social: [{ icon: 'github', label: 'GitHub', href: 'https://github.com/coleam00/Archon' }],
|
|
editLink: {
|
|
baseUrl: 'https://github.com/coleam00/Archon/edit/main/packages/docs-web/',
|
|
},
|
|
sidebar: [
|
|
{
|
|
label: 'The Book of Archon',
|
|
autogenerate: { directory: 'book' },
|
|
},
|
|
{
|
|
label: 'Getting Started',
|
|
autogenerate: { directory: 'getting-started' },
|
|
},
|
|
{
|
|
label: 'Guides',
|
|
autogenerate: { directory: 'guides' },
|
|
},
|
|
{
|
|
label: 'Adapters',
|
|
autogenerate: { directory: 'adapters' },
|
|
},
|
|
{
|
|
label: 'Deployment',
|
|
autogenerate: { directory: 'deployment' },
|
|
},
|
|
{
|
|
label: 'Reference',
|
|
autogenerate: { directory: 'reference' },
|
|
},
|
|
{
|
|
label: 'Contributing',
|
|
autogenerate: { directory: 'contributing' },
|
|
},
|
|
],
|
|
customCss: ['./src/styles/custom.css'],
|
|
}),
|
|
],
|
|
});
|