|
1 | | -# Jan's Website |
| 1 | +# Jan Browser Extension Documentation |
2 | 2 |
|
3 | | -This website is [built with Starlight](https://starlight.astro.build) |
| 3 | +This documentation site is built with [Starlight](https://starlight.astro.build) and mirrors the main [Jan documentation](https://docs.jan.ai) structure for consistency across the Jan ecosystem. |
4 | 4 |
|
| 5 | +## 🎯 For Jan Browser Extension Developers |
5 | 6 |
|
6 | | -Starlight looks for `.md` or `.mdx` files in the `src/content/docs/` directory. Each file is exposed |
7 | | -as a route based on its file name. |
| 7 | +**Focus Area**: Work primarily in `./docs/src/content/docs/browser/` - this is where all Jan Browser Extension-specific documentation lives. |
8 | 8 |
|
9 | | -Images can be added to `src/assets/` and embedded in Markdown with a relative link. |
| 9 | +The navigation automatically routes to the main Jan docs: |
| 10 | +- **"Docs"** → `https://docs.jan.ai` |
| 11 | +- **"API Reference"** → `https://docs.jan.ai/api` |
10 | 12 |
|
11 | | -Static assets, like favicons, can be placed in the `public/` directory. |
| 13 | +### Adding New Documentation |
12 | 14 |
|
13 | | -If you want to add new pages, these can go in the `src/pages/` directory. Because of the topics plugin |
14 | | -we are using ([starlight sidebar topics](https://starlight-sidebar-topics.netlify.app/docs/guides/excluded-pages/)) |
15 | | -you will need to exclude them from the sidebar by adding them to the exclude list in `astro.config.mjs`, e.g., `exclude: ['/example'],`. |
| 15 | +1. **Create files** in `./docs/src/content/docs/browser/` |
| 16 | +2. **Update sidebar** in `astro.config.mjs` under the "Browser Extension" section: |
| 17 | + |
| 18 | +```js |
| 19 | +{ |
| 20 | + label: "Browser Extension", |
| 21 | + items: [ |
| 22 | + { label: "Overview", slug: "browser" }, |
| 23 | + { label: "Your New Page", slug: "browser/your-new-page" }, // Add here |
| 24 | + // ... existing items |
| 25 | + ], |
| 26 | +} |
| 27 | +``` |
16 | 28 |
|
17 | 29 | ## 🧞 Commands |
18 | 30 |
|
19 | | -All commands are run from the root of the project, from a terminal: |
| 31 | +All commands run from the `./docs/` directory: |
| 32 | + |
| 33 | +| Command | Action | |
| 34 | +| :-------------------- | :---------------------------------------- | |
| 35 | +| `bun install` | Install dependencies | |
| 36 | +| `bun dev` | Start dev server at `localhost:4321` | |
| 37 | +| `bun build` | Build production site to `./dist/` | |
| 38 | +| `bun preview` | Preview build locally | |
| 39 | + |
| 40 | +**⚠️ Important**: After running `bun dev`, manually navigate to `http://localhost:4321/browser/` since the main index page doesn't exist in this repo (it's in the main Jan repository). |
| 41 | + |
| 42 | +## 📁 Structure |
| 43 | + |
| 44 | +``` |
| 45 | +docs/ |
| 46 | +├── src/content/docs/ |
| 47 | +│ └── browser/ ← Your work goes here |
| 48 | +├── astro.config.mjs ← Update sidebar here |
| 49 | +└── public/ |
| 50 | + ├── scripts/ |
| 51 | + └── styles/ |
| 52 | +``` |
| 53 | + |
| 54 | +## 🔗 Navigation |
| 55 | + |
| 56 | +The site automatically includes navigation that links back to the main Jan documentation ecosystem. This ensures users can easily move between Jan Desktop docs, API Reference, and Jan Browser Extension docs. |
| 57 | + |
| 58 | +## 📝 Writing Guidelines |
| 59 | + |
| 60 | +- Use clear, concise language |
| 61 | +- Include code examples where helpful |
| 62 | +- Follow the existing documentation patterns from the main Jan docs |
| 63 | +- Test your changes with `bun dev` before committing |
20 | 64 |
|
21 | | -| Command | Action | |
22 | | -| :------------------------ | :----------------------------------------------- | |
23 | | -| `bun install` | Installs dependencies | |
24 | | -| `bun dev` | Starts local dev server at `localhost:4321` | |
25 | | -| `bun build` | Build your production site to `./dist/` | |
26 | | -| `bun preview` | Preview your build locally, before deploying | |
27 | | -| `bun astro ...` | Run CLI commands like `astro add`, `astro check` | |
28 | | -| `bun astro -- --help` | Get help using the Astro CLI | |
| 65 | +For questions about the documentation structure or navigation, refer to the main [Jan documentation repository](https://github.com/menloresearch/jan). |
0 commit comments