diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9878fb541a7..cdc224927a3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -195,6 +195,10 @@ jobs: run: yarn playwright install --with-deps chromium working-directory: website-next + - name: Format Check + run: yarn format:check + working-directory: website-next + - name: Lint run: yarn lint working-directory: website-next diff --git a/website-next/AGENTS.md b/website-next/AGENTS.md index 0d6fdb860bb..412085d3421 100644 --- a/website-next/AGENTS.md +++ b/website-next/AGENTS.md @@ -1,7 +1,9 @@ + # This is NOT the Next.js you know This version has breaking changes — APIs, conventions, and file structure may all differ from your training data. Read the relevant guide in `node_modules/next/dist/docs/` before writing any code. Heed deprecation notices. + # Writing documentation diff --git a/website-next/README.md b/website-next/README.md index c80b89c8c52..b9540ed9515 100644 --- a/website-next/README.md +++ b/website-next/README.md @@ -87,7 +87,7 @@ time, and **fails the build on broken links**. [Page in another section](../guides/first-party-api.md) [Cross-product page](../../hotchocolate/index.md) [Deep link with anchor](./other-page.md#a-section) -[Same-page anchor](#a-section) +[Same-page anchor](#a-section) ``` - Always point at the `.md` file (e.g. `./cli.md`, not `/docs/.../cli`). diff --git a/website-next/app/(content)/legal/acceptable-use-policy/page.tsx b/website-next/app/(content)/legal/acceptable-use-policy/page.tsx index 9e4e0223f2a..168482077fc 100644 --- a/website-next/app/(content)/legal/acceptable-use-policy/page.tsx +++ b/website-next/app/(content)/legal/acceptable-use-policy/page.tsx @@ -1,7 +1,7 @@ import { createStaticPage } from "@/src/helpers/staticPage"; const { Page, generateMetadata } = createStaticPage( - "legal/acceptable-use-policy.md" + "legal/acceptable-use-policy.md", ); export { generateMetadata }; diff --git a/website-next/app/(content)/legal/cookie-policy/page.tsx b/website-next/app/(content)/legal/cookie-policy/page.tsx index 0dc43d2bd1d..1dfaee007e8 100644 --- a/website-next/app/(content)/legal/cookie-policy/page.tsx +++ b/website-next/app/(content)/legal/cookie-policy/page.tsx @@ -1,8 +1,6 @@ import { createStaticPage } from "@/src/helpers/staticPage"; -const { Page, generateMetadata } = createStaticPage( - "legal/cookie-policy.md" -); +const { Page, generateMetadata } = createStaticPage("legal/cookie-policy.md"); export { generateMetadata }; export default Page; diff --git a/website-next/app/(content)/legal/privacy-policy/page.tsx b/website-next/app/(content)/legal/privacy-policy/page.tsx index 45524f89b0a..237d14a8584 100644 --- a/website-next/app/(content)/legal/privacy-policy/page.tsx +++ b/website-next/app/(content)/legal/privacy-policy/page.tsx @@ -1,8 +1,6 @@ import { createStaticPage } from "@/src/helpers/staticPage"; -const { Page, generateMetadata } = createStaticPage( - "legal/privacy-policy.md" -); +const { Page, generateMetadata } = createStaticPage("legal/privacy-policy.md"); export { generateMetadata }; export default Page; diff --git a/website-next/app/(content)/legal/terms-of-service/page.tsx b/website-next/app/(content)/legal/terms-of-service/page.tsx index a8d0e1f6b05..61264bf28fa 100644 --- a/website-next/app/(content)/legal/terms-of-service/page.tsx +++ b/website-next/app/(content)/legal/terms-of-service/page.tsx @@ -1,7 +1,7 @@ import { createStaticPage } from "@/src/helpers/staticPage"; const { Page, generateMetadata } = createStaticPage( - "legal/terms-of-service.md" + "legal/terms-of-service.md", ); export { generateMetadata }; diff --git a/website-next/app/(content)/licensing/chillicream-license/page.tsx b/website-next/app/(content)/licensing/chillicream-license/page.tsx index 8d923abc176..8d316ced48c 100644 --- a/website-next/app/(content)/licensing/chillicream-license/page.tsx +++ b/website-next/app/(content)/licensing/chillicream-license/page.tsx @@ -1,7 +1,7 @@ import { createStaticPage } from "@/src/helpers/staticPage"; const { Page, generateMetadata } = createStaticPage( - "licensing/chillicream-license.md" + "licensing/chillicream-license.md", ); export { generateMetadata }; diff --git a/website-next/app/(content)/platform/ecosystem/page.tsx b/website-next/app/(content)/platform/ecosystem/page.tsx index a2ef620396b..82253b36eff 100644 --- a/website-next/app/(content)/platform/ecosystem/page.tsx +++ b/website-next/app/(content)/platform/ecosystem/page.tsx @@ -79,19 +79,19 @@ export default function EcosystemPage() { secondaryLinkText="Launch" />
-

+

Everything you need to build great APIs — and more

{FEATURES.map((feature) => (
-

+

{feature.title}

-

+

{feature.description}

diff --git a/website-next/app/(content)/platform/page.tsx b/website-next/app/(content)/platform/page.tsx index d7fd278a36d..a5df1291949 100644 --- a/website-next/app/(content)/platform/page.tsx +++ b/website-next/app/(content)/platform/page.tsx @@ -41,15 +41,15 @@ export default function PlatformPage() { -

+

{section.title}

-

+

{section.description}

- + Learn more → diff --git a/website-next/app/(content)/products/hotchocolate/page.tsx b/website-next/app/(content)/products/hotchocolate/page.tsx index ff75a7f2c8b..2e6a8ed9ed7 100644 --- a/website-next/app/(content)/products/hotchocolate/page.tsx +++ b/website-next/app/(content)/products/hotchocolate/page.tsx @@ -64,12 +64,12 @@ export default function HotChocolatePage() { {FEATURES.map((feature) => (
-

+

{feature.title}

-

+

{feature.description}

diff --git a/website-next/app/(content)/products/nitro/NitroDownload.tsx b/website-next/app/(content)/products/nitro/NitroDownload.tsx index dd188eb4b3a..6a53ed838aa 100644 --- a/website-next/app/(content)/products/nitro/NitroDownload.tsx +++ b/website-next/app/(content)/products/nitro/NitroDownload.tsx @@ -75,15 +75,14 @@ interface LatestAppInfo { } async function fetchAppInfo(variant: Variant, os: OS): Promise { - const filename = - os === "windows" ? `${variant}.yml` : `${variant}-${os}.yml`; + const filename = os === "windows" ? `${variant}.yml` : `${variant}-${os}.yml`; const response = await fetch( - DOWNLOAD_BASE_URL + filename + "?no-cache=" + new Date().getTime() + DOWNLOAD_BASE_URL + filename + "?no-cache=" + new Date().getTime(), ); if (!response.ok) { throw new Error( - `Failed to fetch ${filename}: ${response.status} ${response.statusText}` + `Failed to fetch ${filename}: ${response.status} ${response.statusText}`, ); } @@ -95,7 +94,7 @@ async function fetchAppInfo(variant: Variant, os: OS): Promise { parsed === null || !Array.isArray((parsed as { files?: unknown }).files) || !(parsed as LatestAppInfo).files.every( - (file) => typeof file?.url === "string" + (file) => typeof file?.url === "string", ) ) { throw new Error(`Invalid app info manifest: ${filename}`); @@ -107,7 +106,7 @@ async function fetchAppInfo(variant: Variant, os: OS): Promise { function findFile( files: LatestAppInfo["files"], predicate: (url: string) => boolean, - description: string + description: string, ): string { const match = files.find((file) => predicate(file.url)); @@ -127,7 +126,7 @@ async function fetchLinuxAppInfo(variant: Variant): Promise { filename: findFile( files, (url) => url.endsWith(".AppImage"), - "Linux AppImage" + "Linux AppImage", ), text: "Linux", }, @@ -144,7 +143,7 @@ async function fetchMacOSAppInfo(variant: Variant): Promise { filename: findFile( files, (url) => isDmg(url) && url.includes("x64"), - "Mac Intel (.dmg)" + "Mac Intel (.dmg)", ), text: "Mac Intel", }, @@ -152,7 +151,7 @@ async function fetchMacOSAppInfo(variant: Variant): Promise { filename: findFile( files, (url) => isDmg(url) && url.includes("arm64"), - "Mac Silicon (.dmg)" + "Mac Silicon (.dmg)", ), text: "Mac Silicon", }, @@ -160,7 +159,7 @@ async function fetchMacOSAppInfo(variant: Variant): Promise { filename: findFile( files, (url) => isDmg(url) && url.includes("universal"), - "Mac Universal (.dmg)" + "Mac Universal (.dmg)", ), text: "Mac Universal", }, @@ -177,7 +176,7 @@ async function fetchWindowsAppInfo(variant: Variant): Promise { filename: findFile( files, (url) => isExe(url) && url.includes("arm64"), - "Windows arm64 (.exe)" + "Windows arm64 (.exe)", ), text: "Windows arm64", }, @@ -185,16 +184,15 @@ async function fetchWindowsAppInfo(variant: Variant): Promise { filename: findFile( files, (url) => isExe(url) && url.includes("x64"), - "Windows x64 (.exe)" + "Windows x64 (.exe)", ), text: "Windows x64", }, universal: { filename: findFile( files, - (url) => - isExe(url) && !url.includes("arm64") && !url.includes("x64"), - "Windows Universal (.exe)" + (url) => isExe(url) && !url.includes("arm64") && !url.includes("x64"), + "Windows Universal (.exe)", ), text: "Windows Universal", }, @@ -203,7 +201,7 @@ async function fetchWindowsAppInfo(variant: Variant): Promise { async function fetchVariantAppInfo( variant: Variant, - os: OS + os: OS, ): Promise { switch (os) { case "linux": @@ -236,7 +234,10 @@ function useActiveAppInfo(): ActiveAppInfoStatus { // to the "ready" state with no active build. const pending = os ? fetchVariantAppInfo("nitro", os).then( - (info): ActiveAppInfoStatus => ({ state: "ready", activeStable: info }) + (info): ActiveAppInfoStatus => ({ + state: "ready", + activeStable: info, + }), ) : Promise.resolve({ state: "ready" }); @@ -312,7 +313,7 @@ function useAppMatrix(enabled: boolean): AppMatrixStatus { }, }, }); - } + }, ) .catch(() => { if (cancelled) { @@ -331,9 +332,11 @@ function useAppMatrix(enabled: boolean): AppMatrixStatus { return status; } -function getActiveDownload( - active: ActiveAppInfo | undefined -): { url: string; text: string; filename?: string } { +function getActiveDownload(active: ActiveAppInfo | undefined): { + url: string; + text: string; + filename?: string; +} { switch (active?.os) { case "linux": return { @@ -366,7 +369,7 @@ function DownloadAppLink({ download={filename} rel="noopener noreferrer nofollow" onClick={onClick} - className="flex items-center justify-center py-1 text-cc-ink hover:text-cc-white" + className="text-cc-ink hover:text-cc-white flex items-center justify-center py-1" aria-label={"Download " + filename} > Open Web Version @@ -471,7 +474,7 @@ export function NitroDownload() { href={active.url} download={active.filename} rel="noopener noreferrer nofollow" - className="inline-flex cursor-pointer flex-col items-center justify-center rounded-l-full bg-cc-ink py-2 pl-7 pr-4 text-sm font-medium leading-tight text-cc-surface no-underline transition-colors hover:bg-cc-white" + className="bg-cc-ink text-cc-surface hover:bg-cc-white inline-flex cursor-pointer flex-col items-center justify-center rounded-l-full py-2 pr-4 pl-7 text-sm leading-tight font-medium no-underline transition-colors" > {active.text} Stable Build @@ -481,7 +484,7 @@ export function NitroDownload() { aria-label="Show all downloads" aria-expanded={open} onClick={() => setOpen((prev) => !prev)} - className="inline-flex cursor-pointer items-center justify-center rounded-r-full border-l border-cc-surface/30 bg-cc-ink py-2 pl-3 pr-5 text-cc-surface transition-colors hover:bg-cc-white" + className="border-cc-surface/30 bg-cc-ink text-cc-surface hover:bg-cc-white inline-flex cursor-pointer items-center justify-center rounded-r-full border-l py-2 pr-5 pl-3 transition-colors" > {open && ( -
- +
+
- - + )} - +
@@ -513,14 +516,14 @@ export function NitroDownload() { key={row.os + row.type} className={ row.groupStart || row.os - ? "border-t border-cc-card-border" + ? "border-cc-card-border border-t" : "" } > - + {row.os} + {row.type} @@ -540,10 +543,10 @@ export function NitroDownload() { ) : (
{matrixLoading ? "Loading downloads…" @@ -553,10 +556,10 @@ export function NitroDownload() {
Open Web Version - | + | (
-

+

{feature.title}

-

+

{feature.description}

diff --git a/website-next/app/(content)/products/strawberryshake/page.tsx b/website-next/app/(content)/products/strawberryshake/page.tsx index d63d5f358d2..25ec418917d 100644 --- a/website-next/app/(content)/products/strawberryshake/page.tsx +++ b/website-next/app/(content)/products/strawberryshake/page.tsx @@ -54,12 +54,12 @@ export default function StrawberryShakePage() { {FEATURES.map((feature) => (
-

+

{feature.title}

-

+

{feature.description}

diff --git a/website-next/app/(content)/resources/page.tsx b/website-next/app/(content)/resources/page.tsx index c4c9914f58b..67f8edbaaab 100644 --- a/website-next/app/(content)/resources/page.tsx +++ b/website-next/app/(content)/resources/page.tsx @@ -63,12 +63,12 @@ export default function ResourcesPage() { {...(link.external ? { target: "_blank", rel: "noopener noreferrer" } : {})} - className="group flex flex-col rounded-xl border border-cc-card-border bg-cc-card-bg backdrop-blur-sm p-6 no-underline transition-colors hover:border-cc-accent" + className="group border-cc-card-border bg-cc-card-bg hover:border-cc-accent flex flex-col rounded-xl border p-6 no-underline backdrop-blur-sm transition-colors" > -

+

{link.title}

-

{link.description}

+

{link.description}

))} diff --git a/website-next/app/(content)/services/page.tsx b/website-next/app/(content)/services/page.tsx index 02ee40fed19..c1e596ec686 100644 --- a/website-next/app/(content)/services/page.tsx +++ b/website-next/app/(content)/services/page.tsx @@ -41,15 +41,15 @@ export default function ServicesPage() { -

+

{section.title}

-

+

{section.description}

- + Learn more → diff --git a/website-next/app/(content)/services/support/contact/ContactForm.tsx b/website-next/app/(content)/services/support/contact/ContactForm.tsx index 1130107c4e6..07a695d78be 100644 --- a/website-next/app/(content)/services/support/contact/ContactForm.tsx +++ b/website-next/app/(content)/services/support/contact/ContactForm.tsx @@ -111,7 +111,7 @@ export function ContactForm() {
{data.subject}} + trigger={{data.subject}} >
    {SUBJECTS.map((s) => ( diff --git a/website-next/app/(content)/services/support/page.tsx b/website-next/app/(content)/services/support/page.tsx index 7d84e627383..104a1dc9cb4 100644 --- a/website-next/app/(content)/services/support/page.tsx +++ b/website-next/app/(content)/services/support/page.tsx @@ -132,7 +132,7 @@ export default function SupportPage() { {row.values.map((v, i) => ( {v === true ? ( - + ) : v === false ? ( diff --git a/website-next/app/blog/[...slug]/page.tsx b/website-next/app/blog/[...slug]/page.tsx index 7792598c83a..cbee6de116f 100644 --- a/website-next/app/blog/[...slug]/page.tsx +++ b/website-next/app/blog/[...slug]/page.tsx @@ -102,7 +102,11 @@ export async function generateMetadata({ title, description, ...(summary?.author - ? { authors: [{ name: summary.author, url: summary.authorUrl ?? undefined }] } + ? { + authors: [ + { name: summary.author, url: summary.authorUrl ?? undefined }, + ], + } : {}), alternates: { canonical: summary?.href, @@ -198,9 +202,12 @@ export default async function BlogSlugPage({ params }: PageProps) {
    - +
    -
    +
    {jsonLd ? (