Skip to content

Fix: Docs Issues #6815

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Apr 8, 2025
10 changes: 5 additions & 5 deletions content/100-getting-started/01-quickstart-sqlite.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ touch script.ts
Then, paste the following boilerplate into it:

```ts file=script.ts showLineNumbers
import { PrismaClient } from '@prisma/client'
import { PrismaClient } from '../generated/prisma'

const prisma = new PrismaClient()

Expand All @@ -170,7 +170,7 @@ This code contains a `main` function that's invoked at the end of the script. It
Let's start with a small query to create a new `User` record in the database and log the resulting object to the console. Add the following code to your `script.ts` file:

```ts file=script.ts highlight=6-12;add showLineNumbers
import { PrismaClient } from '@prisma/client'
import { PrismaClient } from '../generated/prisma'

const prisma = new PrismaClient()

Expand Down Expand Up @@ -231,7 +231,7 @@ Prisma Client offers various queries to read data from your database. In this se
Delete the previous Prisma Client query and add the new `findMany` query instead:

```ts file=script.ts highlight=6-7;add showLineNumbers
import { PrismaClient } from '@prisma/client'
import { PrismaClient } from '../generated/prisma'

const prisma = new PrismaClient()

Expand Down Expand Up @@ -284,7 +284,7 @@ One of the main features of Prisma Client is the ease of working with [relations
First, adjust your script to include the nested query:

```ts file=script.ts highlight=6-24;add showLineNumbers
import { PrismaClient } from '@prisma/client'
import { PrismaClient } from '../generated/prisma'

const prisma = new PrismaClient()

Expand Down Expand Up @@ -350,7 +350,7 @@ By default, Prisma Client only returns _scalar_ fields in the result objects of
In order to also retrieve the `Post` records that belong to a `User`, you can use the `include` option via the `posts` relation field:

```ts file=script.ts highlight=6-11;add showLineNumbers
import { PrismaClient } from '@prisma/client'
import { PrismaClient } from '../generated/prisma'

const prisma = new PrismaClient()

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: 'Relations'
metaTitle: 'Relations (Reference)'
metaTitle: 'Relations'
metaDescription: 'A relation is a connection between two models in the Prisma schema. This page explains how you can define one-to-one, one-to-many and many-to-many relations in Prisma.'
tocDepth: 3
---
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 9 additions & 9 deletions content/200-orm/400-tools/05-prisma-cli.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,6 @@ See [Prisma CLI command reference](/orm/reference/prisma-cli-reference) for a co

The Prisma CLI is typically installed locally as a **development dependency**, that's why the `--save-dev` (npm) and `--dev` (Yarn) options are used in the commands below.

:::info

We **recommend that you install the Prisma CLI locally** in your project's `package.json` to avoid version conflicts that can happen with a global installation.

:::

### npm

Install with [npm](https://www.npmjs.com/):
Expand Down Expand Up @@ -61,30 +55,36 @@ bun add prisma
<details>
<summary>Global installation (Not recommended)</summary>

:::warning

We **do not recommend installing the Prisma CLI globally** because it can lead to version conflicts.

:::

- **npm**

Install with npm:

```
npm install -g prisma
```

<br />
- **Yarn**

Install with Yarn:

```
yarn global add prisma
```

<br />
- **pnpm**

Install with pnpm:

```
pnpm install prisma --global
```

<br />
- **Bun**

Install with [Bun](https://bun.sh):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ The following [Preview](/orm/more/releases#preview) feature flags are available
| `driverAdapters` | [5.4.0](https://github.com/prisma/prisma/releases/tag/5.4.0) | [Submit feedback](https://github.com/prisma/prisma/issues/3108) |
| `relationJoins` | [5.7.0](https://github.com/prisma/prisma/releases/tag/5.7.0) | [Submit feedback](https://github.com/prisma/prisma/discussions/22288) |
| `nativeDistinct` | [5.7.0](https://github.com/prisma/prisma/releases/tag/5.7.0) | [Submit feedback](https://github.com/prisma/prisma/discussions/22287) |
| `prismaSchemaFolder` | [5.15.0](https://github.com/prisma/prisma/releases/tag/5.15.0) | [Submit feedback](https://github.com/prisma/prisma/discussions/24413) |
| [`prismaSchemaFolder`](/orm/prisma-schema/overview/location#multi-file-prisma-schema) | [5.15.0](https://github.com/prisma/prisma/releases/tag/5.15.0) | [Submit feedback](https://github.com/prisma/prisma/discussions/24413) |
| `typedSql` | [5.19.0](https://github.com/prisma/prisma/releases/tag/5.19.0) | [Submit feedback](https://github.com/prisma/prisma/discussions/25106) |
| `strictUndefinedChecks` | [5.20.0](https://github.com/prisma/prisma/releases/tag/5.20.0) | [Submit feedback](https://github.com/prisma/prisma/discussions/25271) |
| [`fullTextSearchPostgres`](/orm/prisma-client/queries/full-text-search) | [6.0.0](https://github.com/prisma/prisma/releases/tag/6.0.0) | [Submit feedback](https://github.com/prisma/prisma/issues/25773) |
Expand Down
76 changes: 38 additions & 38 deletions src/css/theming.css
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
--ifm-breadcrumb-separator: url("/icons/breadcrumb.svg");
--navbar-teal-color: rgb(24, 115, 103);
--navbar-tab-bg: rgb(237, 242, 247);
--homepage-hero-gradient: linear-gradient(180deg, #F7FAFC 0%, rgba(247, 250, 252, 0) 100%);
--homepage-hero-gradient: linear-gradient(180deg, #f7fafc 0%, rgba(247, 250, 252, 0) 100%);
--navbar-indigo-color: rgb(76, 81, 191);
--ifm-navbar-height: 80px;
--ifm-color-content: #2d3748;
Expand All @@ -46,7 +46,8 @@
--docusaurus-added-code-line-bg: rgba(71, 187, 120, 0.1);
--docusaurus-deleted-code-line-bg: rgba(229, 62, 62, 0.1);
--docusaurus-edited-code-line-bg: rgba(10, 104, 255, 0.2);
--docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.05);
--docusaurus-highlighted-code-line-bg-dark: rgba(113, 232, 223, 0.1);
--docusaurus-highlighted-code-line-bg-light: rgba(113, 232, 223, 0.2);
--ifm-blockquote-border-color: transparent;
--ifm-toc-padding-horizontal: 1rem;
--docusaurus-details-decoration-color: transparent;
Expand All @@ -61,8 +62,8 @@
--ifm-tabs-color: #718096;
--main-font-color: #2d3748;
--primary-font-color: var(--gray-800);
--surface-secondary: #2D3748;
--surface-primary: #fff;
--surface-secondary: #2d3748;
--surface-primary: #fff;
--secondary-font-color: #4a5568;
--tertiary-font-color: #718096;
--ifm-dropdown-background-color: #fff;
Expand Down Expand Up @@ -157,15 +158,15 @@
--gray-900: #1a202c;
--gray-1000: #090a15;

--teal-100: #D9F9F6;
--teal-200: #B7F4EE;
--teal-300: #92EFE6;
--teal-400: #71E8DF;
--teal-500: #04C8BB;
--teal-600: #16A394;
--teal-100: #d9f9f6;
--teal-200: #b7f4ee;
--teal-300: #92efe6;
--teal-400: #71e8df;
--teal-500: #04c8bb;
--teal-600: #16a394;
--teal-700: #187367;
--teal-800: #154F47;
--teal-900: #154F47;
--teal-800: #154f47;
--teal-900: #154f47;

@media (max-width: 996px) {
--ifm-menu-link-sublist-icon: url("/icons/chevron-up-solid.svg");
Expand Down Expand Up @@ -194,7 +195,7 @@ html[data-theme="dark"] {
--ifm-color-primary-lightest: #4fddbf;
--navbar-teal-color: rgb(113, 232, 223);
--navbar-tab-bg: rgb(45, 55, 72);
--homepage-hero-gradient: linear-gradient(180deg, #161D2B 0%, rgba(22, 29, 43, 0.00) 100%);
--homepage-hero-gradient: linear-gradient(180deg, #161d2b 0%, rgba(22, 29, 43, 0) 100%);
--navbar-indigo-color: rgb(127, 156, 245);
--ifm-color-content: rgb(247, 250, 252);
--ifm-navbar-link-color: #e2e8f0;
Expand All @@ -209,10 +210,10 @@ html[data-theme="dark"] {
--ifm-tabs-bg-color-active: #2d3748;
--main-font-color: #e2e8f0;
--primary-font-color: rgb(247, 250, 252);
--surface-secondary: #E2E8F0;
--surface-primary: #090A15;
--surface-secondary: #e2e8f0;
--surface-primary: #090a15;
--secondary-font-color: rgb(203, 213, 224);
--tertiary-font-color: #A0AEC0;
--tertiary-font-color: #a0aec0;
--ifm-dropdown-background-color: var(--gray-1000);
--ifm-dropdown-hover-background-color: transparent;
--icon-wrapper-bg: rgb(90, 103, 216);
Expand All @@ -221,7 +222,7 @@ html[data-theme="dark"] {
--indigo-link-color: #7f9cf5;
--teal-card-bg: linear-gradient(128deg, #090a15 31.75%, #0d3a38 112.39%);
--indigo-card-bg: linear-gradient(128deg, #090a15 31.75%, #181a48 112.39%);
--card-bg: #1A202C;
--card-bg: #1a202c;
--orm-card-bg: var(--gray-900);
--grid-border-color: var(--gray-700);
--community-bgd-color: var(--gray-900);
Expand All @@ -248,7 +249,7 @@ html[data-theme="dark"] {
--header-btn-color: #4a5568;
--navbar-teal-color: rgb(113, 232, 223);
--navbar-tab-bg: rgb(45, 55, 72);
--homepage-hero-gradient: linear-gradient(180deg, #161D2B 0%, rgba(22, 29, 43, 0.00) 100%);
--homepage-hero-gradient: linear-gradient(180deg, #161d2b 0%, rgba(22, 29, 43, 0) 100%);
--navbar-indigo-color: rgb(127, 156, 245);
--ifm-color-content: rgb(247, 250, 252);
--ifm-navbar-background-color: var(--gray-1000);
Expand Down Expand Up @@ -300,7 +301,7 @@ html[data-theme="dark"] {
--ifm-breadcrumb-separator: url("/icons/breadcrumb.svg");
--navbar-teal-color: rgb(24, 115, 103);
--navbar-tab-bg: rgb(237, 242, 247);
--homepage-hero-gradient: linear-gradient(180deg, #F7FAFC 0%, rgba(247, 250, 252, 0) 100%);
--homepage-hero-gradient: linear-gradient(180deg, #f7fafc 0%, rgba(247, 250, 252, 0) 100%);
--navbar-indigo-color: rgb(76, 81, 191);
--ifm-navbar-height: 80px;
--ifm-color-content: #2d3748;
Expand All @@ -314,8 +315,8 @@ html[data-theme="dark"] {
--ifm-color-primary-hover: var(--indigo-400);
--ifm-heading-color: var(--ifm-color-content);
--ifm-navbar-background-color: #fff;
--docsearch-key-shadow: inset 0 -2px 0 0 #cdcde6, inset 0 0 1px 1px #fff,
0 1px 2px 1px rgba(30, 35, 90, 0.4);
--docsearch-key-shadow:
inset 0 -2px 0 0 #cdcde6, inset 0 0 1px 1px #fff, 0 1px 2px 1px rgba(30, 35, 90, 0.4);
--code-bg: var(--gray-200);
--ifm-tabs-color: #718096;
--ifm-tabs-bg-color: #e2e8f0;
Expand All @@ -330,8 +331,8 @@ html[data-theme="dark"] {
--ifm-dropdown-background-color: #fff;
--ifm-dropdown-hover-background-color: transparent;
--primary-font-color: var(--gray-800);
--surface-secondary: #2D3748;
--surface-primary: #FFFFFF;
--surface-secondary: #2d3748;
--surface-primary: #ffffff;
--icon-wrapper-bg: rgb(235, 244, 255);
--icon-svg-color: #5a67d8;
--teal-link-color: #16a394;
Expand Down Expand Up @@ -422,16 +423,15 @@ html[data-theme="dark"] {
--gray-900: #1a202c;
--gray-1000: #090a15;


--teal-100: #D9F9F6;
--teal-200: #B7F4EE;
--teal-300: #92EFE6;
--teal-400: #71E8DF;
--teal-500: #04C8BB;
--teal-600: #16A394;
--teal-100: #d9f9f6;
--teal-200: #b7f4ee;
--teal-300: #92efe6;
--teal-400: #71e8df;
--teal-500: #04c8bb;
--teal-600: #16a394;
--teal-700: #187367;
--teal-800: #154F47;
--teal-900: #154F47;
--teal-800: #154f47;
--teal-900: #154f47;
}

:root[data-theme="dark"] {
Expand All @@ -446,7 +446,7 @@ html[data-theme="dark"] {
--ifm-color-primary-lightest: #4fddbf;
--navbar-teal-color: rgb(113, 232, 223);
--navbar-tab-bg: rgb(45, 55, 72);
--homepage-hero-gradient: linear-gradient(180deg, #161D2B 0%, rgba(22, 29, 43, 0.00) 100%);
--homepage-hero-gradient: linear-gradient(180deg, #161d2b 0%, rgba(22, 29, 43, 0) 100%);
--navbar-indigo-color: rgb(127, 156, 245);
--ifm-color-content: rgb(247, 250, 252);
--ifm-navbar-link-color: #e2e8f0;
Expand All @@ -461,10 +461,10 @@ html[data-theme="dark"] {
--ifm-tabs-bg-color-active: #2d3748;
--main-font-color: #e2e8f0;
--primary-font-color: rgb(247, 250, 252);
--surface-secondary: #E2E8F0;
--surface-primary: #090A15;
--surface-secondary: #e2e8f0;
--surface-primary: #090a15;
--secondary-font-color: rgb(203, 213, 224);
--tertiary-font-color: #A0AEC0;
--tertiary-font-color: #a0aec0;
--ifm-dropdown-background-color: var(--gray-1000);
--ifm-dropdown-hover-background-color: transparent;
--icon-wrapper-bg: rgb(90, 103, 216);
Expand All @@ -473,7 +473,7 @@ html[data-theme="dark"] {
--indigo-link-color: #7f9cf5;
--teal-card-bg: linear-gradient(128deg, #090a15 31.75%, #0d3a38 112.39%);
--indigo-card-bg: linear-gradient(128deg, #090a15 31.75%, #181a48 112.39%);
--card-bg: #1A202C;
--card-bg: #1a202c;
--orm-card-bg: var(--gray-900);
--grid-border-color: var(--gray-700);
--community-bgd-color: var(--gray-900);
Expand Down Expand Up @@ -501,7 +501,7 @@ html[data-theme="dark"] {
--header-btn-color: #4a5568;
--navbar-teal-color: rgb(113, 232, 223);
--navbar-tab-bg: rgb(45, 55, 72);
--homepage-hero-gradient: linear-gradient(180deg, #161D2B 0%, rgba(22, 29, 43, 0.00) 100%);
--homepage-hero-gradient: linear-gradient(180deg, #161d2b 0%, rgba(22, 29, 43, 0) 100%);
--navbar-indigo-color: rgb(127, 156, 245);
--ifm-color-content: rgb(247, 250, 252);
--ifm-navbar-background-color: var(--gray-1000);
Expand Down
6 changes: 5 additions & 1 deletion src/theme/CodeBlock/Line/styles.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,15 @@ the background in custom CSS file due bug https://github.com/facebook/docusaurus
}

:global(.theme-code-block-highlighted-line) {
background-color: var(--docusaurus-highlighted-code-line-bg);
background-color: var(--docusaurus-highlighted-code-line-bg-dark);
display: block;
position: relative;
}

:root[data-theme="light"] :global(.theme-code-block-highlighted-line) {
background-color: var(--docusaurus-highlighted-code-line-bg-light);
}

:global(.theme-code-block-stronger-line.theme-code-block-highlighted-line) {
background-color: rgba(0, 0, 0, 0.15);
display: block;
Expand Down
43 changes: 18 additions & 25 deletions src/theme/Layout/index.tsx
Original file line number Diff line number Diff line change
@@ -1,21 +1,17 @@
import React, {useEffect, type ReactNode} from 'react';
import clsx from 'clsx';
import ErrorBoundary from '@docusaurus/ErrorBoundary';
import {
PageMetadata,
SkipToContentFallbackId,
ThemeClassNames,
} from '@docusaurus/theme-common';
import {useKeyboardNavigation} from '@docusaurus/theme-common/internal';
import SkipToContent from '@theme/SkipToContent';
import AnnouncementBar from '@theme/AnnouncementBar';
import Navbar from '@theme/Navbar';
import Footer from '@theme/Footer';
import LayoutProvider from '@theme/Layout/Provider';
import ErrorPageContent from '@theme/ErrorPageContent';
import type {Props} from '@theme/Layout';
import styles from './styles.module.css';
import { useHistory, useLocation } from '@docusaurus/router';
import React, { useEffect, type ReactNode } from "react";
import clsx from "clsx";
import ErrorBoundary from "@docusaurus/ErrorBoundary";
import { PageMetadata, SkipToContentFallbackId, ThemeClassNames } from "@docusaurus/theme-common";
import { useKeyboardNavigation } from "@docusaurus/theme-common/internal";
import SkipToContent from "@theme/SkipToContent";
import AnnouncementBar from "@theme/AnnouncementBar";
import Navbar from "@theme/Navbar";
import Footer from "@theme/Footer";
import LayoutProvider from "@theme/Layout/Provider";
import ErrorPageContent from "@theme/ErrorPageContent";
import type { Props } from "@theme/Layout";
import styles from "./styles.module.css";
import { useHistory, useLocation } from "@docusaurus/router";

export default function Layout(props: Props): ReactNode {
const {
Expand All @@ -42,13 +38,13 @@ export default function Layout(props: Props): ReactNode {
const storedParams = localStorage.getItem("utm_params");

if (storedParams) {
history.replace(`${location.pathname}?${storedParams}`);
history.replace(`${location.pathname}?${storedParams}${location.hash}`);
}
} else {
localStorage.setItem("utm_params", currentParams.toString());
}
}, [location, history]);

useEffect(() => {
const handleKeyDown = (event: KeyboardEvent) => {
const isKapaModalOpen = document.querySelector('#__docusaurus[aria-hidden="true"]');
Expand All @@ -74,11 +70,8 @@ export default function Layout(props: Props): ReactNode {

<div
id={SkipToContentFallbackId}
className={clsx(
ThemeClassNames.wrapper.main,
styles.mainWrapper,
wrapperClassName,
)}>
className={clsx(ThemeClassNames.wrapper.main, styles.mainWrapper, wrapperClassName)}
>
<ErrorBoundary fallback={(params) => <ErrorPageContent {...params} />}>
{children}
</ErrorBoundary>
Expand Down
Loading