2024-10-24 22:24:13 +02:00
|
|
|
import starlight from '@astrojs/starlight'
|
|
|
|
import { defineConfig } from 'astro/config'
|
2024-10-18 17:36:20 -07:00
|
|
|
import starlightOpenAPI, { openAPISidebarGroups } from 'starlight-openapi'
|
|
|
|
|
|
|
|
// https://astro.build/config
|
|
|
|
export default defineConfig({
|
|
|
|
site: 'https://docs.modrinth.com',
|
|
|
|
integrations: [
|
|
|
|
starlight({
|
|
|
|
title: 'Modrinth Documentation',
|
2024-10-24 22:24:13 +02:00
|
|
|
favicon: '/favicon.ico',
|
2024-10-18 17:36:20 -07:00
|
|
|
editLink: {
|
|
|
|
baseUrl: 'https://github.com/modrinth/code/edit/main/apps/docs/',
|
|
|
|
},
|
|
|
|
social: {
|
2024-10-24 22:24:13 +02:00
|
|
|
github: 'https://github.com/modrinth/code',
|
|
|
|
discord: 'https://discord.modrinth.com',
|
|
|
|
'x.com': 'https://x.com/modrinth',
|
|
|
|
mastodon: 'https://floss.social/@modrinth',
|
|
|
|
threads: 'https://threads.net/@modrinth',
|
2024-10-18 17:36:20 -07:00
|
|
|
},
|
|
|
|
logo: {
|
|
|
|
light: './src/assets/light-logo.svg',
|
|
|
|
dark: './src/assets/dark-logo.svg',
|
|
|
|
replacesTitle: true,
|
|
|
|
},
|
|
|
|
customCss: [
|
|
|
|
'@modrinth/assets/styles/variables.scss',
|
|
|
|
'@modrinth/assets/styles/inter.scss',
|
|
|
|
'./src/styles/modrinth.css',
|
|
|
|
],
|
|
|
|
plugins: [
|
|
|
|
// Generate the OpenAPI documentation pages.
|
|
|
|
starlightOpenAPI([
|
|
|
|
{
|
|
|
|
base: 'api',
|
|
|
|
label: 'Modrinth API',
|
|
|
|
schema: './public/openapi.yaml',
|
|
|
|
},
|
2024-10-24 22:24:13 +02:00
|
|
|
]),
|
2024-10-18 17:36:20 -07:00
|
|
|
],
|
|
|
|
sidebar: [
|
|
|
|
{
|
2024-10-24 22:24:13 +02:00
|
|
|
label: 'Contributing to Modrinth',
|
|
|
|
autogenerate: { directory: 'contributing' },
|
2024-10-18 17:36:20 -07:00
|
|
|
},
|
2025-04-19 15:51:01 +02:00
|
|
|
{
|
|
|
|
label: 'Guides',
|
|
|
|
autogenerate: { directory: 'guide' },
|
|
|
|
},
|
2024-10-18 17:36:20 -07:00
|
|
|
// Add the generated sidebar group to the sidebar.
|
|
|
|
...openAPISidebarGroups,
|
|
|
|
],
|
|
|
|
}),
|
|
|
|
],
|
2024-10-24 22:24:13 +02:00
|
|
|
})
|