Skip to content
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

Render octicons in code examples #840

Closed
shawnbot opened this issue Jul 17, 2019 · 0 comments · Fixed by #854
Closed

Render octicons in code examples #840

shawnbot opened this issue Jul 17, 2019 · 0 comments · Fixed by #854
Assignees

Comments

@shawnbot
Copy link
Contributor

This has been a really hard thing to figure out with the mess of MDX@0 (see: the migration guide) + our custom loader, Next.js (ugh), and various hacks that we made for react-live along the way. I think the most painless way to do this until we're using Gatsby and the new theme is to add a transform step at the very beginning of the MDX pipeline that replaces ERB <%= octicon %> helper text with an inlined <svg> element, then updates the fenced code block to have html as the language instead of erb (assuming there are no other ERB template tags remaining after the replacement).

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 a pull request may close this issue.

1 participant