-
-
Notifications
You must be signed in to change notification settings - Fork 33
fix(code-block): custom MDX code block without layout shift #811
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
Conversation
Hello @maanasb01 sir, |
Hey @Preetiaarya, the changes look good! Can you also try to stylize the code blocks? Please try to keep the style associated with the Uli website's theme. You can take the inspiration from the Tattle's website if you want. Example of a blog page with code blocks: https://tattle.co.in/blog/2025-04-01-feluda-semantic-versioning/. CC: @aatmanvaidya |
Thanks for the feedback! I’ll style the code blocks to match the Uli theme. Will refer to the Tattle blog and UliCore.jsx for consistency. Will share updates soon! |
Hey @Preetiaarya, in your changes, the The key issue is that the syntax on every blog page is incorrect according to the updated Gatsby version. Instead of doing this in a blog mdx file (current implementation):
We have to change it to this:
I had made a change in Thanks! |
Hello @maanasb01 ,Thanks for the clarification. I checked the |
Hello @maanasb01, I have updated all the blog pages as per the suggested changes. |
@Preetiaarya, I think you have not pushed your changes yet. Can you please push them? |
Hello @maanasb01, Earlier my commits were not showing up because the Husky pre-commit hook was failing, so my changes never actually got committed and pushed. I have now committed all the fixes (code snippet handling + blog conflict resolutions) and pushed them to the branch fix/code-block-style. Could you please review the changes now and share your feedback? |
Hello @maanasb01, On the blog page, I replaced the heading with bold text because the heading was breaking the line spacing and didn’t look bold, so it didn’t feel like a proper heading. |
Hey @Preetiaarya, can you undo your last commit where you have replaced headings with bold text? The headings should resemble headings; currently, with this change, they appear as normal bold text. |
Sure, I’ll revert the last commit and make sure the headings are restored properly. |
…cing issues" This reverts commit 423dac4.
This PR fixes the broken styling for code blocks in MDX-rendered blog pages #558
✅ Removed dependency on
react-code-blocks
✅ Implemented a custom