Lines numbers for code in blogdown


#1

I'd like to get line numbers for the code on my blogdown site.

Existing solutions seem to rely on LaTeX or require two code blocks, one for display and one for execution.

Is there an easier way to do this?


#2

You could embed a gist… It wouldn't be my personal go-to, but I haven't seen anything as of yet that requires minimal effort (you might want to check the Hugo discourse forum).