Skip to content

Commit e6781c2

Browse files
authored
feat: Update Docs theme to match brand (#500)
* feat: Update theme to match brand * feat: Improve spacing between text and interactive elements * chore: Run npm format * fix: Update RemoteCode component for compatibility
1 parent ee3a4b8 commit e6781c2

25 files changed

+1440
-175
lines changed

astro.config.mjs

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,11 @@
22

33
import { defineConfig } from 'astro/config';
44
import starlight from '@astrojs/starlight';
5+
import tailwindcss from '@tailwindcss/vite';
56
import starlightLinksValidator from 'starlight-links-validator';
67
import starlightAutoSidebar from 'starlight-auto-sidebar';
78
import starlightImageZoom from 'starlight-image-zoom';
9+
import starlightThemeNova from 'starlight-theme-nova';
810
import opengraphImages from 'astro-opengraph-images';
911
import { renderer } from './src/og/renderer.tsx';
1012
import { readFileSync } from 'node:fs';
@@ -15,8 +17,12 @@ const site = 'https://docs.shorebird.dev/';
1517
// https://astro.build/config
1618
export default defineConfig({
1719
site,
20+
vite: {
21+
plugins: [tailwindcss()],
22+
},
1823
integrations: [
1924
starlight({
25+
expressiveCode: false,
2026
title: 'Shorebird',
2127
tagline: 'Flutter Code Push',
2228
logo: {
@@ -38,9 +44,23 @@ export default defineConfig({
3844
],
3945
editLink: { baseUrl: 'https://github.com/shorebirdtech/docs/edit/main/' },
4046
favicon: 'favicon.svg',
41-
components: { Head: './src/components/starlight/Head.astro' },
42-
customCss: ['./src/tailwind.css'],
43-
expressiveCode: { themes: ['dark-plus', 'github-light'] },
47+
head: [
48+
{
49+
tag: 'link',
50+
attrs: {
51+
rel: 'preload',
52+
href: '/fonts/GeneralSans-Variable.woff2',
53+
as: 'font',
54+
type: 'font/woff2',
55+
crossorigin: '',
56+
},
57+
},
58+
],
59+
components: {
60+
Head: './src/components/starlight/Head.astro',
61+
ThemeSelect: './src/components/ThemeSelect.astro',
62+
},
63+
customCss: ['./src/styles/custom.css'],
4464
sidebar: [
4565
{ label: 'Welcome', link: '/' },
4666
{
@@ -78,6 +98,7 @@ export default defineConfig({
7898
},
7999
],
80100
plugins: [
101+
starlightThemeNova(),
81102
starlightAutoSidebar(),
82103
starlightImageZoom(),
83104
starlightLinksValidator({

0 commit comments

Comments
 (0)