Skip to content

Commit 97a0a08

Browse files
committed
Update Astro config with sitemap and site details
Added @astrojs/sitemap integration and updated the site URL to 'https://docs.sprites.dev'. Updated GitHub links, edit link base URL, and registered new custom components (Header, PageTitle, SiteTitle) in the Starlight config.
1 parent 413c035 commit 97a0a08

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

astro.config.mjs

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
// @ts-check
22
import { defineConfig } from 'astro/config';
33
import starlight from '@astrojs/starlight';
4+
import sitemap from '@astrojs/sitemap';
45
import react from '@astrojs/react';
56
import tailwindcss from '@tailwindcss/vite';
67

78
// https://astro.build/config
89
export default defineConfig({
9-
site: 'https://sprites.dev', // Update to your actual domain
10+
site: 'https://docs.sprites.dev',
1011
prefetch: {
1112
prefetchAll: true,
1213
defaultStrategy: 'viewport', // Prefetch links when they enter viewport
@@ -26,10 +27,10 @@ export default defineConfig({
2627
favicon: '/favicon.svg',
2728
customCss: ['./src/styles/custom.css'],
2829
social: [
29-
{ icon: 'github', label: 'GitHub', href: 'https://github.com/superfly/sprites' },
30+
{ icon: 'github', label: 'GitHub', href: 'https://github.com/superfly/sprites-docs' },
3031
],
3132
editLink: {
32-
baseUrl: 'https://github.com/superfly/sprites-docs/edit/main/',
33+
baseUrl: 'https://github.com/superfly/sprites-docs/edit/master/',
3334
},
3435
sidebar: [
3536
{
@@ -80,10 +81,14 @@ export default defineConfig({
8081
],
8182
head: [], // Fonts are now self-hosted via fontsource
8283
components: {
84+
Header: './src/components/Header.astro',
8385
ThemeSelect: './src/components/ThemeSelect.astro',
86+
PageTitle: './src/components/PageTitle.astro',
87+
SiteTitle: './src/components/SiteTitle.astro',
8488
},
8589
}),
8690
react(),
91+
sitemap(),
8792
],
8893
vite: {
8994
plugins: [tailwindcss()],

0 commit comments

Comments
 (0)