Better code highlighting on the web: rehype-tree-sitter

This page summarizes the projects mentioned and recommended in the original post on news.ycombinator.com

Our great sponsors
  • Appwrite - The open-source backend cloud platform
  • Onboard AI - Learn any GitHub repo in 59 seconds
  • InfluxDB - Collect and Analyze Billions of Data Points in Real Time
  • marked

    A markdown parser and compiler. Built for speed.

    Another contestant in this realm is Bright[1]. It runs entirely on the server and doesn't increase bundle size as seen here[2]. Regarding parsing speed tree-sitter is without a doubt performant since it is written in Rust, but I don't have any problems "parsing on every keystroke" with a setup containing Marked[3], highlight.js[4] and a sanitizer. I did however experience performance issues with other Markdown parser libraries than Marked.

    [1]: https://bright.codehike.org/

    [2]: https://aihelperbot.com/test-suite

    [3]: https://github.com/markedjs/marked

    [4]: https://highlightjs.org/

  • astro

    The web framework that scales with you — Build fast content sites, powerful web applications, dynamic server APIs, and everything in-between ⭐️ Star to support our work!

    Never heard of Astro[1] until today. I was looking for something better than Hugo and ended up using Nuxt content. How is this better than nuxt content :D ?

    [1]: https://astro.build/

  • Appwrite

    Appwrite - The open-source backend cloud platform. Add Auth, Databases, Functions, and Storage to your product and build any application at any scale while using your preferred coding languages and tools.

  • rehype-starry-night

    Rehype plugin to highlight code with Starry Night

    Shameless plug for the Rehype plugin [1] I wrote based on Starry Night [2]. If you're interested in syntax highlighting like GitHub or customize it with CSS properties (for example, to support multiple themes), this is one solution.

    [1] https://github.com/Microflash/rehype-starry-night

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts