Skip to content

Conversation

@tstirrat15
Copy link

Description

The old directions didn't work for me as I was upgrading from Nextra 2->3. I'm assuming they'll work similarly in Nextra 4 when I get there. This configuration works for me.

Changes

Update custom grammar documentation to a working configuration

Testing

Review. See that these steps work in your own system.

@changeset-bot
Copy link

changeset-bot bot commented Nov 25, 2025

⚠️ No Changeset found

Latest commit: 99b3da3

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@vercel
Copy link

vercel bot commented Nov 25, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
nextra-v2 Ready Ready Preview Comment Nov 25, 2025 10:53pm

@vercel
Copy link

vercel bot commented Nov 25, 2025

@tstirrat15 is attempting to deploy a commit to the Vercel Team on Vercel.

A member of the Team first needs to authorize it.

Comment on lines +249 to +257
import { readFileSync } from 'fs'
import { join } from 'path'

const myLangGrammar = JSON.parse(
readFileSync(
join(import.meta.dirname, "./grammars/myLang.tmLanguage.json"),
"utf8",
),
);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
import { readFileSync } from 'fs'
import { join } from 'path'
const myLangGrammar = JSON.parse(
readFileSync(
join(import.meta.dirname, "./grammars/myLang.tmLanguage.json"),
"utf8",
),
);
import myLangGrammar from './grammars/myLang.tmLanguage.json' with { type: 'json' }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants