Lines numbers for code in blogdown

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?

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).