Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork254
Syntax lookup dynamic include#170
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Syntax lookup dynamic include#170
Uh oh!
There was an error while loading.Please reload this page.
Conversation
ryyppy commentedJan 5, 2021 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Right, so you solved one part, which is extracting the meta data back for the UI so it can do the search stuff. My concern was more about the resulting bundle coming from the mdx component files (the help text for each syntax construct). My initial idea was to use This change was definitely necessary anyways, so I will take it for now as is. Thanks EDIT: Ah and good job on finding yourself through the code. Really nice and readable diffs. |
Uh oh!
There was an error while loading.Please reload this page.
Suggestion for dynamically importing the syntax files for#162
Usage is as follows:
[1] Write a new syntax mdx file.
[2] Run the
extract-syntax.jsscript to generate a syntax index json file.[3] The SyntaxLookupWidget will then read the index file and include on the page.
Just sharing what I have so far and see what you think.
Edit 1: I see the Vercel check has failed. I'm not sure what that problem might be.
Edit 2: Looks like adding extract-syntax to the update-index script fixed it.