3
5 Comments

Syntax Highlighter for Dev blog

I'm looking for a good code block formatter that does syntax highlighting on Ghost blog. Does anyone have any good options?

I've tried prism but the colors look too generic.

posted to Icon for group Developers
Developers
on March 11, 2022
  1. 1

    I use Prism on both my blog and for a book I recently published and have been really pleased with its power and flexibility — since you aren't happy with the default themes you might check https://github.com/PrismJS/prism-themes for additional themes.

    There's also a newer, JS-free option that looks really interesting: https://torchlight.dev

    If I ever decide to make a major update to my blog, I'll probably give Torchlight a serious look.

    1. 1

      Fantastic, the prism-themes are much much better!

      Man the torchlight dev with line highlighting is really cool but I prob can't use it with Ghost.

  2. 1

    I've used HighlightJS on any blog that requires syntax highlighting and love it: https://highlightjs.org/

    • Supports pretty much any language
    • Easily extensible
    • Themeable

    Our blog, https://serversideup.net/ uses it for all of our code. Should work with Ghost as well. Hope this helps!

    1. 1

      ooo that's a good alternative too. Thank you so much for the suggestion!

    2. 1

      That looks fantastic! It’s a shame they charge $14/month for only 5000 visits, though. Really breaks for dev blogs that aren’t more commercialized than an occasional affiliate link.

Trending on Indie Hackers
I'm a lawyer who launched an AI contract tool on Product Hunt today — here's what building it as a non-technical founder actually felt like User Avatar 151 comments Never hire an SEO Agency for your Saas Startup User Avatar 83 comments A simple way to keep AI automations from making bad decisions User Avatar 65 comments “This contract looked normal - but could cost millions” User Avatar 54 comments 👉 The most expensive contract mistakes don’t feel risky User Avatar 41 comments We automated our business vetting with OpenClaw User Avatar 34 comments