Files
winutil/docs/astro.config.mjs
Sean (ANGRYxScotsman)andGitHub 89fd09fc0e fix(docs): add mobile navigation to the splash homepage (#4904)
The homepage uses Starlight's splash template, which has no sidebar and
therefore never gets Starlight's own mobile menu toggle - on narrow
viewports there was no way to reach any nav link at all. Add a small
toggle + panel in the header (only rendered on pages without a sidebar)
exposing the same links as the desktop nav, and group it with the
search icon so mobile actions sit together instead of spread across
the header.

Also add the Store and Forums links to the real sidebar config so
they're reachable on mobile on every other page too (previously only
in the desktop-only top nav), and pull both URLs from a shared
site-links.ts so the sidebar config and header can't drift apart.
2026-08-03 11:36:46 -05:00

71 lines
2.6 KiB
JavaScript

// @ts-check
import { defineConfig } from 'astro/config';
import starlight from '@astrojs/starlight';
import { siteLinks } from './src/site-links.ts';
// https://astro.build/config
export default defineConfig({
site: 'https://winutil.christitus.com/',
integrations: [
starlight({
title: 'WinUtil',
description: "Chris Titus Tech's Windows Utility — install apps, apply tweaks, run fixes, and manage Windows from one place.",
logo: {
src: './src/assets/branding/navlogo.png',
replacesTitle: true,
},
favicon: '/favicon.svg',
social: [
{ icon: 'github', label: 'GitHub', href: 'https://github.com/ChrisTitusTech/winutil' },
{ icon: 'discord', label: 'Discord', href: 'https://discord.gg/RUbZUZyByQ' },
],
// Global theme overrides (colors, fonts, landing-page section styles).
customCss: ['./src/styles/theme.css'],
// Custom component overrides, all under src/components/.
components: {
ThemeProvider: './src/components/ThemeProvider.astro',
Header: './src/components/Header.astro',
Hero: './src/components/Hero.astro',
Footer: './src/components/Footer.astro',
},
editLink: {
baseUrl: 'https://github.com/ChrisTitusTech/winutil/edit/main/docs/',
},
// Sidebar groups, top to bottom: User Guide, Code Reference, Help.
sidebar: [
{
label: 'User Guide',
items: [
{ label: 'Overview', slug: 'guides' },
{ label: 'Getting Started', slug: 'guides/getting-started' },
{ label: 'Applications', slug: 'guides/application' },
{ label: 'Tweaks', slug: 'guides/tweaks' },
{ label: 'Features', slug: 'guides/features' },
{ label: 'Updates', slug: 'guides/updates' },
{ label: 'Automation', slug: 'guides/automation' },
{ label: 'Win11 Creator', slug: 'guides/win11creator' },
],
},
{
label: 'Code Reference',
items: [
{ label: 'Architecture & Design', slug: 'code-reference/architecture' },
{ label: 'Tweaks Reference', items: [{ autogenerate: { directory: 'code-reference/tweaks' } }] },
{ label: 'Features Reference', items: [{ autogenerate: { directory: 'code-reference/features' } }] },
],
},
{
label: 'Help',
items: [
{ label: 'FAQ', slug: 'faq' },
{ label: 'Known Issues', slug: 'knownissues' },
{ label: 'Contributing', slug: 'contributing' },
{ label: siteLinks.forums.label, link: siteLinks.forums.href, attrs: { target: '_blank', rel: 'noreferrer' } },
],
},
{ label: siteLinks.store.label, link: siteLinks.store.href, attrs: { target: '_blank', rel: 'noreferrer' } },
],
}),
],
});