From 9738f9aff2846a5b420e2b08363ab9f19b881c30 Mon Sep 17 00:00:00 2001 From: Code Date: Fri, 10 Jan 2025 19:40:56 +0100 Subject: [PATCH] Initial commit: Set up Astro with Starlight, i18n, and DevToolbar --- astro.config.mjs | 31 +++++++++++++++++++ .../docs/es/guides/getting-started.mdx | 21 +++++++++++++ src/content/docs/es/index.mdx | 12 +++++++ src/content/docs/guides/getting-started.mdx | 21 +++++++++++++ src/content/docs/index.mdx | 12 +++++++ 5 files changed, 97 insertions(+) create mode 100644 astro.config.mjs create mode 100644 src/content/docs/es/guides/getting-started.mdx create mode 100644 src/content/docs/es/index.mdx create mode 100644 src/content/docs/guides/getting-started.mdx create mode 100644 src/content/docs/index.mdx diff --git a/astro.config.mjs b/astro.config.mjs new file mode 100644 index 0000000..c4dec8c --- /dev/null +++ b/astro.config.mjs @@ -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(), + ], +}); \ No newline at end of file diff --git a/src/content/docs/es/guides/getting-started.mdx b/src/content/docs/es/guides/getting-started.mdx new file mode 100644 index 0000000..1e5b0d4 --- /dev/null +++ b/src/content/docs/es/guides/getting-started.mdx @@ -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 diff --git a/src/content/docs/es/index.mdx b/src/content/docs/es/index.mdx new file mode 100644 index 0000000..4bd2605 --- /dev/null +++ b/src/content/docs/es/index.mdx @@ -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). diff --git a/src/content/docs/guides/getting-started.mdx b/src/content/docs/guides/getting-started.mdx new file mode 100644 index 0000000..7508478 --- /dev/null +++ b/src/content/docs/guides/getting-started.mdx @@ -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 diff --git a/src/content/docs/index.mdx b/src/content/docs/index.mdx new file mode 100644 index 0000000..856e7c8 --- /dev/null +++ b/src/content/docs/index.mdx @@ -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).