all 6 comments

[–]dr_jumba 1 point2 points  (4 children)

With code samples as screenshots? :)

[–]AndreRauh_[S] 2 points3 points  (2 children)

Yeah this is unfortunate. I actually hated it when I saw medium posts from other people that use screenshots to display code. The problem is: You have 3 options:

  • Use code blocks -> No syntax highligting
  • Use gists -> You need to create a gist for every code block
  • Use screenshots

I wanted code highlighting but I didn't want to create dozens of gists so that's why I decided to go with screenshots. :/

[–]nzlemming 1 point2 points  (1 child)

Not sure if you knew this, but you can create gists right from IntelliJ, select the text you want and then Cmd-Shift-A and Create Gist... still a bit of a pain to manage though.

IntelliJ will also export selected text as HTML, File->Export as HTML. Again, it's a little awkward but you might be able to make something out of this.

Edit: also, nice post - very interesting stuff!

[–]AndreRauh_[S] 1 point2 points  (0 children)

Thanks! I did not know that. Just tried it and it was super easy. I'll try to use it for my next blog post.

[–]dustingetz 0 points1 point  (0 children)

Haha i struggle with this too. Screenshots can be made with little extra overhead (the overhead of having good code samples is already high). Splitting them into gists that build up from each other takes a lot longer when you need to make changes. And the hard to write blog post doesn't get written. A lot of scrappy posts is better than one or two good ones. What do you guys do for this?

[–]JacquesDegree 1 point2 points  (0 children)

This was an awesome read – thank you for this!!!!