-
-
Notifications
You must be signed in to change notification settings - Fork 184
Upgrade nextra docs #1599
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
Upgrade nextra docs #1599
Conversation
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR modernizes the website
project by migrating configs to TypeScript, updating dependencies (Next.js, Nextra, etc.), restructuring imports for modularity, and cleaning up legacy files.
- Switched JS configs to
.ts
/.tsx
and added ESLint Flat Config - Updated key dependencies and introduced
pagefind
search - Centralized MDX components, refactored
RemoteSource
, and removed deprecated pages
Reviewed Changes
Copilot reviewed 47 out of 55 changed files in this pull request and generated 1 comment.
Show a summary per file
File | Description |
---|---|
website/tsconfig.json | Added Next.js plugin and updated include for .next types |
website/theme.config.tsx | Removed legacy Nextra theme config |
website/src/movies/PlaygroundMovie.tsx | Renamed component, added "use client" |
website/src/movies/HomeStrengthMovie.tsx | Updated import path for HomeCodeBlock |
website/src/movies/HomeHeroMovie.tsx | Updated import paths for home components |
website/src/content/index.mdx | Adjusted imports for HomeLayout and HomeStrengthMovie |
website/src/content/docs/validators/*.mdx | Updated RemoteSource import paths |
website/src/content/docs/validators/_meta.ts | Added satisfies MetaRecord |
website/src/content/docs/utilization/_meta.ts | Added satisfies MetaRecord |
website/src/content/docs/setup.mdx | Updated RemoteSource import path |
website/src/content/docs/random.mdx | Updated RemoteSource import path |
website/src/content/docs/protobuf/*.mdx | Updated RemoteSource import paths |
website/src/content/docs/protobuf/_meta.ts | Added satisfies MetaRecord |
website/src/content/docs/misc.mdx | Updated RemoteSource import path |
website/src/content/docs/llm/*.mdx | Updated RemoteSource and snippet imports |
website/src/content/docs/llm/_meta.ts | Added satisfies MetaRecord |
website/src/content/docs/json/*.mdx | Updated RemoteSource import paths |
website/src/content/docs/json/_meta.ts | Added satisfies MetaRecord |
website/src/content/docs/_meta.ts | Added satisfies MetaRecord , removed newWindow props |
website/src/content/_meta.ts | Added satisfies MetaRecord , configured hidden/display/theme |
website/src/components/home/HomeLayout.tsx | Added "use client" for MUI styled component |
website/src/components/RemoteSource.tsx | Refactored to async function, switched MDX compiler/import |
website/src/app/playground/page.tsx | Introduced new app-router PlaygroundPage |
website/src/app/layout.jsx | Migrated layout to app router with Nextra theme docs |
website/src/app/[[...mdxPath]]/page.jsx | Consolidated dynamic MDX routing and metadata |
website/pages/playground/index.mdx | Removed legacy pages folder (migrated to app router) |
website/pages/playground/_meta.js | Deleted old playground metadata |
website/pages/_app.js | Removed deprecated _app.js |
website/package.json | Restructured build scripts, bumped Next.js/Nextra versions, added pagefind |
website/next.config.ts | Added TypeScript Next.js config with Nextra wrapper |
website/next.config.mjs | Removed old JS config |
website/next-sitemap.config.js | Updated string quote style |
website/mdx-components.jsx | Created centralized MDX component hook |
website/eslint.config.mjs | Added FlatCompat for ESLint |
website/.gitignore | Updated ignored paths for Next.js and _pagefind |
Comments suppressed due to low confidence (2)
website/next.config.ts:1
- You removed
theme.config.tsx
but did not pass athemeConfig
option to Nextra. If you rely on a custom theme config, add thethemeConfig
path tonextra({ themeConfig: './theme.config.tsx' })
.
import nextra from "nextra";
website/src/movies/PlaygroundMovie.tsx:1
- React hooks (
useState
,useEffect
) are used in this component but React and the hooks are not imported. Addimport React, { useState, useEffect } from "react";
at the top.
"use client";
This pull request includes significant updates to the
website
project, focusing on migrating to the latest versions of dependencies, restructuring the project for improved modularity, and updating configuration files. Key changes include the adoption of TypeScript for configuration files, updates to dependencies, and the removal of unused or outdated code.Dependency and Configuration Updates:
next
,nextra
, andnextra-theme-docs
dependencies to their latest versions inpackage.json
to ensure compatibility with the latest features and fixes. Addedpagefind
for enhanced search functionality. [1] [2]next.config.ts
,_meta.ts
) for better type safety and maintainability. [1] [2] [3] [4]eslint.config.mjs
withFlatCompat
to align with modern ESLint configuration standards.Project Restructuring:
mdx-components.jsx
and replaced legacy MDX imports with updated paths. [1] [2]src/app/[[...mdxPath]]/page.jsx
. (website/src/app/[[...mdxPath]]/page.jsxR1-R27)_meta.js
files into TypeScript (_meta.ts
) and updated their structure to usesatisfies MetaRecord
for stricter type validation. [1] [2] [3]Codebase Cleanup:
pages/_app.js
andpages/playground/_meta.js
. [1] [2]RemoteSource
component to use async/await and removed unnecessary state management.next-sitemap.config.js
andnext.config.mjs
, in favor of updated equivalents. [1] [2]Functional Enhancements:
PlaygroundPage
component insrc/app/playground/page.tsx
for improved modularity and maintainability.Miscellaneous:
.gitignore
to include_pagefind/
and adjusted ignored paths for better clarity.package.json
by introducingprebuild
andpostbuild
steps for better separation of concerns.These changes collectively modernize the codebase, enhance maintainability, and prepare the project for future development.