Search code examples
rhugoblogdown

Blogdown using Hugo - How to expand width of code chunks?


Problem

The code I'm posting on my Blogdown site is too wide and induces a side scroll bar:

enter image description here

Question

How do I change the config page to make the width of text chunks wider?

I want the solution to be expanding the width of the content or posts section of Blogdown/Hugo is this possible?

I came across a few possible solutions:

1) Change the theme parameters -- not sure how to do this, but I realized this may be the only way 2) Change Hugo themes all together.


Solution

  • One option is to change the max-width argument (look for @media (min-width: 600px) { section { or something similar) inside main.css in your theme directory. Might be a good idea to look at your theme git for more details.