Hacker News new | ask | show | jobs
by cupcakestand 3251 days ago
Totally agree. Code embedding is also limited on Medium, I think they still lack syntax highlighting.

Btw, great tip wih Netlify. How is your experience with them, what are pros cons compared to Github Pages and can I run server code like Node for free?

3 comments

OT, but syntax highlighting is hardly the weakest part of displaying code on a webpage. Nobody's disrupting horizontal scrollbars or margin-busting, but the first person who does is going to be a hero.
I was so close to doing this when I was making my new blog, then I found out that the CSS element responsible for making the code block scollable isn't supported on mobile.
Any time I have to embed code in Medium, I just type the code in a free Github Gist and post the link - Medium automatically embeds the Gist in a nice, syntax highlighted format, with a link to the original gist.

e.g. (towards bottom of this article I wrote - syntax highlighting in HTML, Javascript and Ruby snippets): https://hackernoon.com/building-a-face-recognition-web-app-i...

> Totally agree. Code embedding is also limited on Medium, I think they still lack syntax highlighting.

Limited how? I find embedding GitHub Gist's works perfectly fine and is automatic -- just paste the link to the Gist in your post and you get an embedded object.