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

Add syntax highlight for code blocks #111

Closed
wants to merge 6 commits into from

Conversation

nkilm
Copy link

@nkilm nkilm commented Feb 24, 2023

Additions

Related Issues

#103 - Syntax Highlighting in docs

Example

checkout the code snippet here - /docs/running-on-vercel

// mentioning programming language is important to highlight appropriate keywords
<script
  async
  defer
  src="/stats/script.js"
  data-website-id="94db1cb1-74f4-4a40-ad6c-962362670409"
></script>

image

References

shiki provides prepacked themes which can be used conveniently with rehype plugin
@vercel
Copy link

vercel bot commented Feb 24, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
website ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 27, 2023 5:39pm

content/running-on-vercel.mdx Outdated Show resolved Hide resolved
next.config.js Outdated Show resolved Hide resolved
@nkilm
Copy link
Author

nkilm commented Aug 23, 2023

@uncenter Please check, I've implemented all the requested changes.

Syntax highlighting works for latest code

image

@uncenter
Copy link
Contributor

Nice work! One last thing. I was taking a look at the code blocks on the website and they look a little dull/grayish with the current theme. I messed around with a bunch of themes and github-light really looks nice.

image image image image

Thoughts? It seems much sharper and stands out more.

@nkilm
Copy link
Author

nkilm commented Aug 23, 2023

Yeah I was about mention that!😅

I'll change the theme to github-light.

@nkilm
Copy link
Author

nkilm commented Aug 23, 2023

@uncenter Done✅

package.json Outdated Show resolved Hide resolved
@nkilm
Copy link
Author

nkilm commented Aug 25, 2023

@uncenter I've removed that package.

@uncenter
Copy link
Contributor

@uncenter I've removed that package.

Did you run the uninstall command or just remove it from the package.json? Looks like you had a build failure as soon as you did that.

@nkilm
Copy link
Author

nkilm commented Aug 26, 2023

@uncenter I've removed that package.

Did you run the uninstall command or just remove it from the package.json? Looks like you had a build failure as soon as you did that.

I didn't remove it using yarn uninstall. I did it manually. I'll fix it now, also are there any other changes which are to be made?

@uncenter
Copy link
Contributor

I think that's it. If the build succeeds + no unnecessary files are changed, it should be good to go.

@nkilm
Copy link
Author

nkilm commented Aug 27, 2023

Alright

@nkilm
Copy link
Author

nkilm commented Aug 27, 2023

@uncenter I've fixed the issue now, build is successful.

@mikecao
Copy link
Collaborator

mikecao commented Sep 1, 2023

We've made major changes to the website, so instead of dealing with merge conflicts, I implemented your solution. It's live on the website now. Closing this PR.

@mikecao mikecao closed this Sep 1, 2023
@uncenter
Copy link
Contributor

uncenter commented Sep 1, 2023

Great! New design + syntax highlighting looking good.

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.

None yet

3 participants