From ec9fd0a25a31cbfcd8c9e9e845b1740bf5f2c441 Mon Sep 17 00:00:00 2001 From: MoonLyss Date: Wed, 7 Aug 2024 14:44:43 +0200 Subject: [PATCH] Add sections --- astro.config.mjs | 46 +++++++++++++++---- .../docs/advanced-interface/introduction.md | 13 ++++++ .../example.md => examples/example-guide.md} | 0 .../example-reference.md} | 0 src/content/docs/fr/guides/getting-started.md | 3 -- src/content/docs/fr/index.mdx | 2 +- .../introduction.md} | 4 +- src/content/docs/index.mdx | 4 +- .../docs/simplified-interface/introduction.md | 13 ++++++ 9 files changed, 69 insertions(+), 16 deletions(-) create mode 100644 src/content/docs/advanced-interface/introduction.md rename src/content/docs/{guides/example.md => examples/example-guide.md} (100%) rename src/content/docs/{reference/example.md => examples/example-reference.md} (100%) delete mode 100644 src/content/docs/fr/guides/getting-started.md rename src/content/docs/{guides/getting-started.md => general/introduction.md} (89%) create mode 100644 src/content/docs/simplified-interface/introduction.md diff --git a/astro.config.mjs b/astro.config.mjs index fb0b9ea..41654b7 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -4,7 +4,11 @@ import { loadEnv } from 'vite'; const { SITE_URL = 'http://localhost:4444', SITE_BASE = '' } = loadEnv(process.env.NODE_ENV, process.cwd(), ""); console.log('SITE_URL', SITE_URL); -console.log('SITE_BASE', SITE_BASE); +if (SITE_BASE !== '') + console.log('SITE_BASE', SITE_BASE); +else + console.log('No site base.') + // https://astro.build/config export default defineConfig({ site: SITE_URL, @@ -14,20 +18,44 @@ export default defineConfig({ integrations: [ starlight({ title: 'Selenite Docs', - social: { - github: 'https://github.com/withastro/starlight', - }, + // social: { + // github: 'https://github.com/withastro/starlight', + // }, sidebar: [ { - label: 'Guides', - items: [ - // Each item here is one entry in the navigation menu. - { label: 'Getting started', slug: 'guides/getting-started' }, - ], + label: 'General', + autogenerate: { directory: 'general' }, + translations: { + fr: 'Général', + }, + }, + { + label: 'Simplified interface', + autogenerate: { directory: 'simplified-interface' }, + translations: { + fr: 'Interface simplifiée', + }, + }, + { + label: 'Advanced interface', + autogenerate: { directory: 'advanced-interface' }, + translations: { + fr: 'Interface avancée', + }, + }, + { + label: 'Developper', + autogenerate: { directory: 'developper' }, + translations: { + fr: 'Développeur', + }, }, { label: 'Reference', autogenerate: { directory: 'reference' }, + translations: { + fr: 'Référence', + }, }, ], defaultLocale: 'root', diff --git a/src/content/docs/advanced-interface/introduction.md b/src/content/docs/advanced-interface/introduction.md new file mode 100644 index 0000000..cb8fcb5 --- /dev/null +++ b/src/content/docs/advanced-interface/introduction.md @@ -0,0 +1,13 @@ +--- +title: Introduction Advanced +description: A guide in my new Starlight docs site. +sidebar: + order: 0 +--- + +Guides lead a user through a specific task they want to accomplish, often with a sequence of steps. +Writing a good guide requires thinking about what your users are trying to do. + +## Further reading + +- Read [about how-to guides](https://diataxis.fr/how-to-guides/) in the Diátaxis framework diff --git a/src/content/docs/guides/example.md b/src/content/docs/examples/example-guide.md similarity index 100% rename from src/content/docs/guides/example.md rename to src/content/docs/examples/example-guide.md diff --git a/src/content/docs/reference/example.md b/src/content/docs/examples/example-reference.md similarity index 100% rename from src/content/docs/reference/example.md rename to src/content/docs/examples/example-reference.md diff --git a/src/content/docs/fr/guides/getting-started.md b/src/content/docs/fr/guides/getting-started.md deleted file mode 100644 index b79537c..0000000 --- a/src/content/docs/fr/guides/getting-started.md +++ /dev/null @@ -1,3 +0,0 @@ ---- -title: Yo ---- \ No newline at end of file diff --git a/src/content/docs/fr/index.mdx b/src/content/docs/fr/index.mdx index b6b9e7d..b4b4652 100644 --- a/src/content/docs/fr/index.mdx +++ b/src/content/docs/fr/index.mdx @@ -13,7 +13,7 @@ hero: # file: ../../assets/houston.webp actions: - text: Démarrage - link: guides/getting-started + link: general/introduction icon: right-arrow variant: primary - text: Documentation de GEOS diff --git a/src/content/docs/guides/getting-started.md b/src/content/docs/general/introduction.md similarity index 89% rename from src/content/docs/guides/getting-started.md rename to src/content/docs/general/introduction.md index 520b182..878f83e 100644 --- a/src/content/docs/guides/getting-started.md +++ b/src/content/docs/general/introduction.md @@ -1,6 +1,8 @@ --- -title: Getting started +title: Introduction description: A guide in my new Starlight docs site. +sidebar: + order: 0 --- Guides lead a user through a specific task they want to accomplish, often with a sequence of steps. diff --git a/src/content/docs/index.mdx b/src/content/docs/index.mdx index 3656758..6a99c1e 100644 --- a/src/content/docs/index.mdx +++ b/src/content/docs/index.mdx @@ -13,8 +13,8 @@ hero: # image: # file: ../../assets/houston.web actions: - - text: Getting Started - link: guides/getting-started + - text: Getting started + link: general/introduction icon: right-arrow variant: primary - text: Read the GEOS docs diff --git a/src/content/docs/simplified-interface/introduction.md b/src/content/docs/simplified-interface/introduction.md new file mode 100644 index 0000000..f03ebdf --- /dev/null +++ b/src/content/docs/simplified-interface/introduction.md @@ -0,0 +1,13 @@ +--- +title: Introduction Simplified +description: A guide in my new Starlight docs site. +sidebar: + order: 0 +--- + +Guides lead a user through a specific task they want to accomplish, often with a sequence of steps. +Writing a good guide requires thinking about what your users are trying to do. + +## Further reading + +- Read [about how-to guides](https://diataxis.fr/how-to-guides/) in the Diátaxis framework