Initial commit: Set up Astro with Starlight, i18n, and DevToolbar

This commit is contained in:
Code 2025-01-10 19:40:56 +01:00
parent ac84e85557
commit 9738f9aff2
5 changed files with 97 additions and 0 deletions

31
astro.config.mjs Normal file
View File

@ -0,0 +1,31 @@
import { defineConfig } from 'astro/config';
import starlight from '@astrojs/starlight';
import devtoolbar from '@astrojs/devtoolbar';
// https://astro.build/config
export default defineConfig({
integrations: [
starlight({
title: 'My Docs',
description: 'Your documentation website',
defaultLocale: 'en',
locales: {
en: {
label: 'English',
},
es: {
label: 'Español',
},
},
sidebar: [
{
label: 'Guides',
items: [
{ label: 'Getting Started', link: '/guides/getting-started' },
],
},
],
}),
devtoolbar(),
],
});

View File

@ -0,0 +1,21 @@
---
title: Primeros Pasos
description: Aprende a usar este sitio de documentación.
---
# Primeros Pasos
Esta es tu guía para comenzar con el proyecto.
## Qué Incluye
- Astro con el tema Starlight
- Soporte para internacionalización (i18n)
- DevToolbar para desarrollo
## Siguientes Pasos
1. Edita esta página en `src/content/docs/es/guides/getting-started.mdx`
2. Agrega nuevas páginas en el directorio `src/content/docs/es`
3. Configura la barra lateral en `astro.config.mjs`
4. Agrega más idiomas en la configuración

View File

@ -0,0 +1,12 @@
---
title: Bienvenido a My Docs
description: Comienza a construir tu sitio de documentación con Starlight.
---
# Bienvenido a My Docs
Este es tu nuevo sitio de documentación, construido con Astro y Starlight.
## Primeros Pasos
Para comenzar, consulta la [Guía de Inicio](/es/guides/getting-started).

View File

@ -0,0 +1,21 @@
---
title: Getting Started
description: Learn how to use this documentation site.
---
# Getting Started
This is your guide to getting started with the project.
## What's Included
- Astro with Starlight theme
- Internationalization (i18n) support
- DevToolbar for development
## Next Steps
1. Edit this page in `src/content/docs/guides/getting-started.mdx`
2. Add new pages to the `src/content/docs` directory
3. Configure your sidebar in `astro.config.mjs`
4. Add more locales in the configuration

View File

@ -0,0 +1,12 @@
---
title: Welcome to My Docs
description: Get started building your docs site with Starlight.
---
# Welcome to My Docs
This is your new documentation site, built with Astro and Starlight.
## Getting Started
To get started, check out the [Getting Started guide](/guides/getting-started).