Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

Merged
ryyppy merged 4 commits intorescript-lang:syntax-lookup-toolfromkevanstannard:syntax-lookup-dynamic-include
Jan 5, 2021
Merged

Syntax lookup dynamic include#170

ryyppy merged 4 commits intorescript-lang:syntax-lookup-toolfromkevanstannard:syntax-lookup-dynamic-include
Jan 5, 2021

Conversation

@kevanstannard
Copy link
Contributor

@kevanstannardkevanstannard commentedJan 5, 2021
edited
Loading

Suggestion for dynamically importing the syntax files for#162

Usage is as follows:

[1] Write a new syntax mdx file.
[2] Run theextract-syntax.js script 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.

image

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.

@ryyppy
Copy link
Member

ryyppy commentedJan 5, 2021
edited
Loading

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 usegetStaticProps and try something likemdx-remote to server side render the resulting markdown texts as plain strings, and later on insert them in the react tree with__dangerouslySetInnerHtml or so.

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.

@ryyppyryyppy merged commitc5551ab intorescript-lang:syntax-lookup-toolJan 5, 2021
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

@kevanstannard@ryyppy

[8]ページ先頭

©2009-2025 Movatter.jp