|
1 | | -# next-i18n-docs |
| 1 | +# Next.js i18n Documentation Site |
2 | 2 |
|
3 | | -This is a Next.js application generated with |
4 | | -[Create Fumadocs](https://github.com/fuma-nama/fumadocs). |
| 3 | +This is the documentation site package for the Next.js i18n Documentation Project. It renders multilingual Next.js documentation using [Fumadocs](https://fumadocs.vercel.app). |
5 | 4 |
|
6 | | -Run development server: |
| 5 | +## Quick Start |
| 6 | + |
| 7 | +Start the development server: |
7 | 8 |
|
8 | 9 | ```bash |
9 | | -npm run dev |
10 | | -# or |
| 10 | +# From the root of the monorepo: |
| 11 | +pnpm dev |
| 12 | + |
| 13 | +# Or from this directory: |
11 | 14 | pnpm dev |
12 | | -# or |
13 | | -yarn dev |
14 | 15 | ``` |
15 | 16 |
|
16 | | -Open http://localhost:3000 with your browser to see the result. |
| 17 | +Open [http://localhost:3000](http://localhost:3000) with your browser to see the result. |
17 | 18 |
|
18 | | -## Learn More |
| 19 | +## Directory Structure |
| 20 | + |
| 21 | +```text |
| 22 | +docs/ |
| 23 | +├── content/ # Documentation content |
| 24 | +│ ├── en/ # English (source) |
| 25 | +│ └── zh-hans/ # Simplified Chinese |
| 26 | +├── messages/ # i18n message files |
| 27 | +│ ├── en.json |
| 28 | +│ └── zh-hans.json |
| 29 | +├── scripts/ # Utility scripts |
| 30 | +└── src/ # Source code |
| 31 | + ├── app/ # Next.js App Router |
| 32 | + ├── components/ # Shared components |
| 33 | + ├── i18n/ # i18n configuration |
| 34 | + ├── lib/ # Utilities |
| 35 | + └── mdx/ # MDX components |
| 36 | +``` |
| 37 | + |
| 38 | +For detailed information about features, translations, and more, please refer to the [project README](../../README.md). |
| 39 | + |
| 40 | +## Translation |
| 41 | + |
| 42 | +In this project, documentation content is stored in the `content` directory: |
| 43 | + |
| 44 | +- `content/en/` - Original English documentation (source of truth) |
| 45 | +- `content/zh-hans/` - Simplified Chinese translation |
| 46 | +- Additional languages can be configured in `translation.config.mjs` |
| 47 | + |
| 48 | +To update translations: |
19 | 49 |
|
20 | | -To learn more about Next.js and Fumadocs, take a look at the following |
21 | | -resources: |
| 50 | +```bash |
| 51 | +# From the root of the monorepo |
| 52 | +pnpm translate |
| 53 | + |
| 54 | +# Or using the translation package directly |
| 55 | +OPENAI_API_KEY=your-api-key pnpm translate |
| 56 | +``` |
| 57 | + |
| 58 | +## Search Index |
| 59 | + |
| 60 | +The search functionality is powered by Orama. To update the search index: |
| 61 | + |
| 62 | +```bash |
| 63 | +pnpm update-search-index |
| 64 | +``` |
| 65 | + |
| 66 | +## Learn More |
22 | 67 |
|
23 | | -- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js |
24 | | - features and API. |
25 | | -- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial. |
26 | | -- [Fumadocs](https://fumadocs.vercel.app) - learn about Fumadocs |
| 68 | +- [Next.js Documentation](https://nextjs.org/docs) - official Next.js docs |
| 69 | +- [Fumadocs](https://fumadocs.vercel.app) - documentation framework used in this project |
| 70 | +- [Next.js i18n Documentation](https://github.com/nextjs/next.js/tree/canary/docs) - source content |
0 commit comments