Is there a trick to getting Hugo site’s pages to print (on a paper printer)? For example: I want to print out a page of Hugo documentation and it seems impossible without losing lines (or code example) between page breaks. Very annoying.
I’m finding the same problem on lots of Hugo sites, so I’m wondering if this is just considered a minor problem that has not been addressed (yet) or if there is something I can do on the User End to get it accomplished. TIA
Print formatting is (by default) a function of the site’s CSS and there many sites (not just Hugo sites) that don’t even think about how to format the page for printing.
I haven’t tried in a long time, but maybe if you use ‘reader’ mode in your browser and try to print that? I know there is a way to do it, but I’m afraid I’ve forgotten what it is (it is browser-specific on how to print without/overriding the page’s CSS, however).
2 Likes
Add a @media rule to the CSS for the relevant pages and make sure that the break-before
, break-after
attributes are set to values that you want. Also, make sure that you print from a browser that knows about all the print rules.
1 Like
Hugo has no role in printing with a physical printer.
As others noted above this is a CSS question and therefore it is OT in this forum.