Skip to content

Refactor to latest Nextra 4 patterns#250

Merged
torn4dom4n merged 1 commit into
mainfrom
refactor-nextra-latest-10764288598827751889
May 25, 2026
Merged

Refactor to latest Nextra 4 patterns#250
torn4dom4n merged 1 commit into
mainfrom
refactor-nextra-latest-10764288598827751889

Conversation

@torn4dom4n
Copy link
Copy Markdown
Member

This PR refactors the Fancy Notes project to align with the latest Nextra 4 and Next.js 15+ patterns.

Key changes:

  1. Catch-all Route Refactor: Converted app/[[...mdxPath]]/page.jsx to page.tsx. Added proper TypeScript types and improved generateMetadata to use page-specific titles for dynamic OG image generation.
  2. Global MDX Components: Updated mdx-components.tsx to include Callout and Steps from nextra/components. This allows using these components in MDX files without explicit imports.
  3. Sidebar Management: Added content/_meta.js to define the sidebar structure, ordering, and human-readable titles for the notes, replacing the default file-based naming.
  4. Layout Simplification: Updated app/layout.tsx to follow the latest Nextra 4 Layout pattern and simplified global metadata.
  5. MDX Cleanup: Removed redundant Steps and Callout imports from all existing MDX files.

Verified the changes with pnpm run build and a Playwright verification script confirming that the sidebar titles are correctly applied and the site builds successfully.


PR created automatically by Jules for task 10764288598827751889 started by @torn4dom4n

- Convert catch-all route to TypeScript with improved metadata handling
- Move Callout and Steps to global MDX components
- Add content/_meta.js for sidebar management
- Simplify layout.tsx and improve dynamic OG image support
- Remove redundant imports from MDX files

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
@google-labs-jules
Copy link
Copy Markdown
Contributor

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@reactreview
Copy link
Copy Markdown

reactreview Bot commented May 25, 2026

99 score

Copy as prompt
Check if these React Review issues are valid. If so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.

Run this before and after your changes to verify the result:
npx react-doctor@latest --verbose --diff

Do not modify the react-doctor configuration unless explicitly asked.
Fix the underlying code issues instead of changing or suppressing the rules.

React Review found 0 errors and 1 warning. This PR leaves the React health score unchanged.

<file name="content/_meta.js">

<violation number="1" location="content/_meta.js:0">
Severity: Warning

Unused file — not reachable from any entry point

Delete the file if it is truly unreachable, or import it from an entry point.

Rule: `unused-file`
</violation>

</file>

Reviewed by reactreview for commit 0df6879. Configure here.

@torn4dom4n torn4dom4n marked this pull request as ready for review May 25, 2026 03:48
@torn4dom4n torn4dom4n merged commit f5837a2 into main May 25, 2026
5 checks passed
@torn4dom4n torn4dom4n deleted the refactor-nextra-latest-10764288598827751889 branch May 25, 2026 03:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant