Skip to content

Commit 8540e5b

Browse files
committed
chore(): some quality of life improvments
1 parent 2f6c00a commit 8540e5b

File tree

6 files changed

+139
-101
lines changed

6 files changed

+139
-101
lines changed

β€Ž.github/workflows/mxbai.ymlβ€Ž

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Sync Mixedbread Vector Store
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches: [main]
7+
paths: [apps/docs/content/docs/**/*.mdx]
8+
9+
concurrency:
10+
group: ${{ github.workflow }}-${{ github.ref }}
11+
cancel-in-progress: true
12+
13+
permissions: {}
14+
15+
jobs:
16+
sync:
17+
runs-on: ubuntu-latest
18+
19+
steps:
20+
- uses: actions/checkout@v4
21+
22+
- name: Install dependencies
23+
uses: ./.github/actions/setup
24+
with:
25+
working-directory: ./apps/docs/content/docs
26+
27+
- name: Sync vector store
28+
shell: bash
29+
working-directory: ./apps/docs/content/docs
30+
env:
31+
MIXEDBREAD_API_KEY: ${{ secrets.MIXEDBREAD_API_KEY }}
32+
MIXEDBREAD_VECTOR_STORE_ID: ${{ secrets.MIXEDBREAD_VECTOR_STORE_ID }}
33+
run: pnpm mxbai vs sync "${MIXEDBREAD_VECTOR_STORE_ID}" "apps/docs/content/docs/**/*.mdx" --yes --strategy fast

β€ŽREADME.mdβ€Ž

Lines changed: 44 additions & 99 deletions
Original file line numberDiff line numberDiff line change
@@ -2,130 +2,75 @@
22

33
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](https://github.com/prisma/docs/blob/main/CONTRIBUTING.md) [![Discord](https://img.shields.io/discord/937751382725886062)](https://discord.com/invite/prisma-937751382725886062?utm_source=twitter&utm_medium=bio&dub_id=0HxLEKaaOg6pL0OL)
44

5-
This repository contains the [source code](./src) and the [content](./content) for the [Prisma documentation](https://www.prisma.io/docs).
5+
This repository is a **pnpm monorepo** containing the Prisma documentation, blog, design system docs, and shared packages.
66

7-
## Contributing to the docs
7+
## Repository structure
88

9-
New contributors are welcome! Read through the [contributing guide](CONTRIBUTING.md) to learn how you can contribute to the Prisma documentation.
9+
| Path | Description |
10+
|------|--------------|
11+
| `apps/docs` | Prisma documentation site (Next.js + Fumadocs) |
12+
| `apps/blog` | Prisma blog |
13+
| `apps/eclipse` | Eclipse design system documentation |
14+
| `packages/eclipse` | Eclipse design system component library (`@prisma-docs/eclipse`) |
15+
| `packages/ui` | Shared UI components and utilities (`@prisma-docs/ui`) |
1016

11-
## Run the docs site locally
17+
See each app’s `README.md` for more detail.
1218

13-
1. Clone this repository.
14-
2. On your computer, open a terminal window in the repository's directory.
15-
3. Run the following commands:
19+
## Contributing
1620

17-
```
18-
npm install
19-
npm run start
20-
```
21-
22-
Be sure to also test building the static site:
21+
New contributors are welcome. Read the [contributing guide](CONTRIBUTING.md) before submitting changes.
2322

24-
```
25-
npm run clean && npm run build
26-
npm run serve
27-
```
23+
## Run locally
2824

29-
To prettify or format the code, run:
25+
From the repository root:
3026

27+
```bash
28+
pnpm install
29+
pnpm dev
3130
```
32-
npm run format
33-
```
34-
35-
Please note that `.md` and `.mdx` files are not formatted by Prettier because they are written in [MDX 3](https://mdxjs.com/blog/v3/) which Prettier [does not support](https://github.com/prettier/prettier/issues/12209).
36-
37-
Visit `http://localhost:3000` to view the app.
38-
39-
## Configure
40-
41-
Write MDX files in `content` folder.
4231

43-
Most frontmatter for the docs are the same as [Docusaurus Frontmatter](https://docusaurus.io/docs/api/plugins/@docusaurus/plugin-content-docs#markdown-front-matter). There are some differences due to legacy frontmatter which are handled [here](https://github.com/prisma/docs/blob/94b04aa1d8f723802e715b531b9808bab2d7ae15/src/theme/DocItem/Metadata/index.tsx).
32+
This starts all apps via Turbo:
4433

45-
When possible, avoid using custom frontmatter fields and use the default ones available via Docusaurus.
34+
- **Docs** β€” http://localhost:3000
35+
- **Blog** β€” http://localhost:3001
36+
- **Eclipse** β€” http://localhost:3002
4637

47-
## Inserting, moving and deleting files
48-
49-
All files/folders in the context are prefixed with a _position_ which indicates the order in which they appear in the sidenav on the docs website. This makes it cumbersome to insert, move and delete files because the positions of a number of other files (if not all) in the same folder might need to be adjusted. Thanks to [Luca Steeb](https://github.com/steebchen/), you can perform these operations with a dedicated CLI called [`mdtool`](https://gist.githubusercontent.com/steebchen/bd085ebde1fcf4242e3fdd0df4d202a6/raw/c04e3d262eb6a302a9fab98f6428fec9329681e2/mdtool).
50-
51-
### Install
52-
53-
First, install `wget`:
38+
To run a single app:
5439

5540
```bash
56-
brew install wget
41+
pnpm --filter docs dev # docs only
42+
pnpm --filter blog dev # blog only
43+
pnpm --filter eclipse dev # eclipse design system docs only
5744
```
5845

59-
Then use `wget` to install `mdtool`:
46+
## Build
6047

6148
```bash
62-
wget https://gist.githubusercontent.com/steebchen/bd085ebde1fcf4242e3fdd0df4d202a6/raw/c04e3d262eb6a302a9fab98f6428fec9329681e2/mdtool -qO /usr/local/bin/mdtool
63-
chmod +x /usr/local/bin/mdtool
64-
```
65-
66-
### Usage
67-
68-
#### Overview
69-
70-
```
71-
mdtool insert 3
72-
mdtool swap A B
73-
mdtool move A B
74-
mdtool remove 4
49+
pnpm build
7550
```
7651

77-
#### `mdtool insert`
52+
To build and serve the docs site:
7853

79-
Make place for a new file at given index and increment all numbers by one after that index:
80-
81-
```
82-
$ mdtool insert INDEX
83-
84-
# e.g.:
85-
$ mdtool insert 2
86-
87-
# Result: for files 01-a, 02-b, 03-c, and 04-d; 03-c is renamed to 04-c and 04-d is renamed to 05-d so you can create a new file at index 2
88-
```
89-
90-
#### `mdtool swap`
91-
92-
Swap two files; specify both filenames (prefix numbers get automatically adjusted):
93-
94-
```
95-
$ mdtool swap FILENAME1 FILENAME2
96-
97-
# e.g.:
98-
$ mdtool swap 03-file1.mdx 07-file2.mdx
99-
100-
# Result: Files are now named: 03-file2.mdx 07-file1.mdx
101-
```
102-
103-
#### `mdtool move`
104-
105-
Move a given file to another given index
106-
107-
```
108-
$ mdtool move FILENAME INDEX
109-
110-
# e.g.:
111-
$ mdtool move 05-file.mdx 2
112-
113-
# Result: 05-file.mdx is move to 02-file.mdx, plus previous files 02-*, 03-*, 04-* are incremented
54+
```bash
55+
pnpm --filter docs build
56+
pnpm --filter docs start
11457
```
11558

116-
#### `mdtool remove`
59+
## Scripts
11760

118-
Shift all other items by -1 at a given index:
61+
| Script | Description |
62+
|--------|-------------|
63+
| `pnpm lint:links` | Validate internal and external links (docs) |
64+
| `pnpm lint:code` | Lint code blocks in MDX (docs) |
65+
| `pnpm lint:spellcheck` | Spell-check content (docs) |
66+
| `pnpm format` | Format code (`.md` / `.mdx` excluded β€” see note below) |
11967

120-
```
121-
$ mdtool remove INDEX
68+
## Content
12269

123-
# e.g.:
124-
$ mdtool remove 2
125-
126-
# Result: 01-a, 02-b, 03-c, 04-d becomes 01-a, 02-b, 02-c, 03-d; 02-b is supposed to be manually deleted
127-
```
70+
- **Docs** β€” `apps/docs/content/docs/` (latest), `apps/docs/content/docs.v6/` (versioned). Sidebar structure comes from `meta.json` in each folder. See [Fumadocs collections](https://fumadocs.dev/docs/mdx/collections).
71+
- **Blog** β€” `apps/blog/content/blog/` (MDX with authors, dates, hero images).
72+
- **Eclipse** β€” `apps/eclipse/content/design-system/` (component docs).
12873

129-
#### Thanks Luca
74+
## Note on formatting
13075

131-
![](https://res.cloudinary.com/prismaio/image/upload/v1628765536/docs/LJ0FGHk_u2jjxv.png)
76+
`.md` and `.mdx` files are not formatted by Prettier because they use [MDX 3](https://mdxjs.com/blog/v3/), which Prettier does not support. See [prettier/prettier#12209](https://github.com/prettier/prettier/issues/12209).

β€Žapps/blog/README.mdβ€Ž

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Prisma Blog
2+
3+
The **Prisma blog** site. A Next.js app that hosts Prisma’s product updates, announcements, tutorials, and technical posts.
4+
5+
## What it does
6+
7+
- **Blog posts** β€” MDX articles with authors, dates, hero images, and code examples
8+
- **Search** β€” Full-text search over blog content
9+
- **LLM endpoints** β€” Routes for AI/LLM consumption of processed blog text (`/llms.mdx/...`, `/llms-full.txt`)
10+
11+
## Run locally
12+
13+
```bash
14+
pnpm install
15+
pnpm dev
16+
```
17+
18+
Runs on **http://localhost:3001** (docs is 3000, eclipse is 3002).
19+
20+
## Structure
21+
22+
- `content/blog/` β€” MDX blog posts
23+
- `src/` β€” App shell, layout, search, and MDX components (TweetEmbed, Youtube, Quote, etc.)
24+
- Uses [Fumadocs](https://fumadocs.dev) for the blog framework
25+
- Uses `@prisma-docs/eclipse` for UI components
26+
27+
## Related
28+
29+
- **Docs**: `apps/docs` β€” Prisma documentation
30+
- **Design system**: `apps/eclipse` β€” Eclipse design system docs

β€Žapps/docs/content/docs.v6/(index)/index.mdxβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Get Started
33
description: Welcome to Prisma! Choose your path below to get started.
44
url: /v6
55
metaTitle: Get started with Prisma
6-
metaDescription: 'Build data-driven applications with ease using Prisma ORM, add connection pooling or global caching with Prisma Accelerate.'
6+
metaDescription: 'Build data-driven applications with ease using Prisma ORM, add connection pooling with Prisma Postgres.'
77
---
88

99
## Prisma ORM

β€Žapps/docs/content/docs/(index)/index.mdxβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Introduction to Prisma
33
description: Build data-driven applications with ease using Prisma ORM and Prisma Postgres
44
url: /
55
metaTitle: Get started with Prisma
6-
metaDescription: 'Build data-driven applications with ease using Prisma ORM, add connection pooling or global caching with Prisma Accelerate.'
6+
metaDescription: 'Build data-driven applications with ease using Prisma ORM, add connection pooling with Prisma Postgres.'
77
---
88
[**Prisma ORM**](/orm) is an open-source ORM that provides fast, type-safe access to Postgres, MySQL, SQLite, and other databases, and runs smoothly across Node.js, Bun, and Deno.
99

β€Žapps/eclipse/README.mdβ€Ž

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Eclipse Design System Docs
2+
3+
The **documentation site** for the [Eclipse Design System](https://prisma.io/docs/design-system). This Next.js app showcases and documents all components from the `@prisma-docs/eclipse` package.
4+
5+
## What it does
6+
7+
- **Design system documentation** β€” Interactive docs for Eclipse atoms (Button, Badge, Input, etc.) and molecules (Card, Tabs, CodeBlock, etc.)
8+
- **Component playground** β€” Live, editable examples for each component
9+
- **Reference site** β€” The main docs (`apps/docs`) imports and uses Eclipse components; this app serves as the component library reference
10+
11+
## Run locally
12+
13+
```bash
14+
pnpm install
15+
pnpm dev
16+
```
17+
18+
Runs on **http://localhost:3002** (docs is 3000, blog is 3001).
19+
20+
## Structure
21+
22+
- `content/design-system/` β€” MDX docs (atoms, molecules, colors)
23+
- `src/` β€” App shell, search, layout, and MDX components
24+
- Uses [Fumadocs](https://fumadocs.dev) for the doc framework
25+
- Consumes `@prisma-docs/eclipse` from `packages/eclipse` (workspace package)
26+
27+
## Related
28+
29+
- **Package**: `packages/eclipse` β€” the actual `@prisma-docs/eclipse` component library
30+
- **Usage**: `apps/docs` β€” Prisma docs site that uses Eclipse components

0 commit comments

Comments
Β (0)