From 4586fcaa6e721aa1c9ae89153b39788670f29496 Mon Sep 17 00:00:00 2001 From: Jason Dent Date: Tue, 10 Nov 2026 18:33:20 +0100 Subject: [PATCH] chore: fix the typecheck and clear config deprecations - Import the JSX type from React; React 19 no longer has a global JSX namespace. - Move onBrokenMarkdownLinks to markdown.hooks (deprecated in Docusaurus 3.9). - Run the typecheck in the Test workflow. - Drop old Jekyll entries from .gitignore. - Use pnpm in the website README. --- .github/workflows/test.yml | 2 ++ .gitignore | 4 ---- website/README.md | 20 ++++++++++++------- website/docusaurus.config.ts | 6 +++++- .../src/components/HomepageFeatures/index.tsx | 1 + website/src/pages/index.tsx | 1 + 6 files changed, 22 insertions(+), 12 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 02c8d28..fde6a3d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -25,5 +25,7 @@ jobs: - name: Install dependencies run: pnpm i + - name: Type Check + run: pnpm --filter website typecheck - name: Test run: pnpm t diff --git a/.gitignore b/.gitignore index 28cd047..c2658d7 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1 @@ -_site/ -.sass-cache/ -.jekyll-cache/ -.jekyll-metadata node_modules/ diff --git a/website/README.md b/website/README.md index 472c59d..6fad8eb 100644 --- a/website/README.md +++ b/website/README.md @@ -4,26 +4,32 @@ This website is built using [Docusaurus](https://docusaurus.io/), a modern stati ### Installation -``` -$ npm i +```sh +pnpm i ``` ### Local Development -``` -$ npm start +```sh +pnpm start ``` This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server. ### Build -``` -$ npm run build +```sh +pnpm build ``` This command generates static content into the `build` directory and can be served using any static contents hosting service. +### Type Check + +```sh +pnpm typecheck +``` + ### Deployment -If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch. +Pushing to `main` deploys the site to GitHub Pages through the `deploy-website.yml` workflow. diff --git a/website/docusaurus.config.ts b/website/docusaurus.config.ts index 99b073c..341dad7 100644 --- a/website/docusaurus.config.ts +++ b/website/docusaurus.config.ts @@ -20,7 +20,11 @@ const config: Config = { deploymentBranch: 'main', onBrokenLinks: 'throw', - onBrokenMarkdownLinks: 'warn', + markdown: { + hooks: { + onBrokenMarkdownLinks: 'warn', + }, + }, // Force trailing slashes on all URLs for GitHub pages. trailingSlash: true, diff --git a/website/src/components/HomepageFeatures/index.tsx b/website/src/components/HomepageFeatures/index.tsx index 320a6df..d1cf544 100644 --- a/website/src/components/HomepageFeatures/index.tsx +++ b/website/src/components/HomepageFeatures/index.tsx @@ -1,3 +1,4 @@ +import type { JSX } from 'react'; import Link from '@docusaurus/Link'; import clsx from 'clsx'; import Heading from '@theme/Heading'; diff --git a/website/src/pages/index.tsx b/website/src/pages/index.tsx index a46bab5..1f381c1 100644 --- a/website/src/pages/index.tsx +++ b/website/src/pages/index.tsx @@ -1,3 +1,4 @@ +import type { JSX } from 'react'; import clsx from 'clsx'; import useDocusaurusContext from '@docusaurus/useDocusaurusContext'; import Layout from '@theme/Layout';