I am using github pages to host my blog. It uses GitHub Flaword Markdown. Here is part of _config.yml
:
markdown: kramdown
# Use Github Flavored Markdown
kramdown:
input: GFM
My articles often contain long lines of code, and I would like to display it with word wrap(so it can be all seen without scrolling) and with line numbers(that allow to distinguish new line from word warp).
I found, that I can enable word wrap, if I use this css property for <pre>
tag: white-space: pre-wrap
. But how can I display line numbers? I am looking for solution that will allow me to continue using github-pages built-in jekyll, that generates blog pages for me automatically.
white-space: pre-wrap
:( Is there any way to have both line number and word wrap in jekyll? – Blacktop