Skip to content

Commit

Permalink
Add i18n
Browse files Browse the repository at this point in the history
  • Loading branch information
Summpot committed Sep 21, 2024
1 parent b587b0b commit a38b0ec
Show file tree
Hide file tree
Showing 13 changed files with 221 additions and 1 deletion.
16 changes: 16 additions & 0 deletions astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,22 @@ export default defineConfig({
integrations: [
starlight({
title: "Pixeval",
defaultLocale: "zh-cn",
locales: {
"zh-cn": {
label: "简体中文",
lang: "zh-CN",
},
en: {
label: "English",
},
fr: {
label: "Français",
},
ru: {
label: "Русский",
},
},
logo: {
src: "./src/assets/logo.png",
},
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ hero:
</span>
tagline: Congrats on setting up a new Starlight project!
image:
file: ../../assets/houston.webp
file: ../../../assets/houston.webp
actions:
- text: Example Guide
link: /guides/example/
Expand Down
File renamed without changes.
11 changes: 11 additions & 0 deletions src/content/docs/fr/guides/example.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
title: Example Guide
description: A guide in my new Starlight docs site.
---

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
46 changes: 46 additions & 0 deletions src/content/docs/fr/index.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
---
title: Welcome to Starlight
description: Get started building your docs site with Starlight.
template: splash
hero:
title: |
Welcome to Starlight with
<span
class="font-black text-transparent
bg-clip-text bg-gradient-to-b
from-accent-700 to-accent-400
dark:from-accent-500 dark:to-accent-200"
>
Tailwind
</span>
tagline: Congrats on setting up a new Starlight project!
image:
file: ../../../assets/houston.webp
actions:
- text: Example Guide
link: /guides/example/
icon: right-arrow
- text: Read the Starlight docs
link: https://starlight.astro.build
icon: external
variant: minimal
---

import { Card, CardGrid } from '@astrojs/starlight/components';

## Next steps

<CardGrid stagger>
<Card title="Update content" icon="pencil">
Edit `src/content/docs/index.mdx` to see this page change.
</Card>
<Card title="Add new content" icon="add-document">
Add Markdown or MDX files to `src/content/docs` to create new pages.
</Card>
<Card title="Configure your site" icon="setting">
Edit your `sidebar` and other config in `astro.config.mjs`.
</Card>
<Card title="Read the docs" icon="open-book">
Learn more in [the Starlight Docs](https://starlight.astro.build/).
</Card>
</CardGrid>
11 changes: 11 additions & 0 deletions src/content/docs/fr/reference/example.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
title: Example Reference
description: A reference page in my new Starlight docs site.
---

Reference pages are ideal for outlining how things work in terse and clear terms.
Less concerned with telling a story or addressing a specific use case, they should give a comprehensive outline of what your documenting.

## Further reading

- Read [about reference](https://diataxis.fr/reference/) in the Diátaxis framework
11 changes: 11 additions & 0 deletions src/content/docs/ru/guides/example.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
title: Example Guide
description: A guide in my new Starlight docs site.
---

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
46 changes: 46 additions & 0 deletions src/content/docs/ru/index.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
---
title: Welcome to Starlight
description: Get started building your docs site with Starlight.
template: splash
hero:
title: |
Welcome to Starlight with
<span
class="font-black text-transparent
bg-clip-text bg-gradient-to-b
from-accent-700 to-accent-400
dark:from-accent-500 dark:to-accent-200"
>
Tailwind
</span>
tagline: Congrats on setting up a new Starlight project!
image:
file: ../../../assets/houston.webp
actions:
- text: Example Guide
link: /guides/example/
icon: right-arrow
- text: Read the Starlight docs
link: https://starlight.astro.build
icon: external
variant: minimal
---

import { Card, CardGrid } from '@astrojs/starlight/components';

## Next steps

<CardGrid stagger>
<Card title="Update content" icon="pencil">
Edit `src/content/docs/index.mdx` to see this page change.
</Card>
<Card title="Add new content" icon="add-document">
Add Markdown or MDX files to `src/content/docs` to create new pages.
</Card>
<Card title="Configure your site" icon="setting">
Edit your `sidebar` and other config in `astro.config.mjs`.
</Card>
<Card title="Read the docs" icon="open-book">
Learn more in [the Starlight Docs](https://starlight.astro.build/).
</Card>
</CardGrid>
11 changes: 11 additions & 0 deletions src/content/docs/ru/reference/example.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
title: Example Reference
description: A reference page in my new Starlight docs site.
---

Reference pages are ideal for outlining how things work in terse and clear terms.
Less concerned with telling a story or addressing a specific use case, they should give a comprehensive outline of what your documenting.

## Further reading

- Read [about reference](https://diataxis.fr/reference/) in the Diátaxis framework
11 changes: 11 additions & 0 deletions src/content/docs/zh-cn/guides/example.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
title: Example Guide
description: A guide in my new Starlight docs site.
---

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
46 changes: 46 additions & 0 deletions src/content/docs/zh-cn/index.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
---
title: Welcome to Starlight
description: Get started building your docs site with Starlight.
template: splash
hero:
title: |
Welcome to Starlight with
<span
class="font-black text-transparent
bg-clip-text bg-gradient-to-b
from-accent-700 to-accent-400
dark:from-accent-500 dark:to-accent-200"
>
Tailwind
</span>
tagline: Congrats on setting up a new Starlight project!
image:
file: ../../../assets/houston.webp
actions:
- text: Example Guide
link: /guides/example/
icon: right-arrow
- text: Read the Starlight docs
link: https://starlight.astro.build
icon: external
variant: minimal
---

import { Card, CardGrid } from '@astrojs/starlight/components';

## Next steps

<CardGrid stagger>
<Card title="Update content" icon="pencil">
Edit `src/content/docs/index.mdx` to see this page change.
</Card>
<Card title="Add new content" icon="add-document">
Add Markdown or MDX files to `src/content/docs` to create new pages.
</Card>
<Card title="Configure your site" icon="setting">
Edit your `sidebar` and other config in `astro.config.mjs`.
</Card>
<Card title="Read the docs" icon="open-book">
Learn more in [the Starlight Docs](https://starlight.astro.build/).
</Card>
</CardGrid>
11 changes: 11 additions & 0 deletions src/content/docs/zh-cn/reference/example.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
title: Example Reference
description: A reference page in my new Starlight docs site.
---

Reference pages are ideal for outlining how things work in terse and clear terms.
Less concerned with telling a story or addressing a specific use case, they should give a comprehensive outline of what your documenting.

## Further reading

- Read [about reference](https://diataxis.fr/reference/) in the Diátaxis framework

0 comments on commit a38b0ec

Please sign in to comment.