Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] Support for printing #94

Closed
cf-sewe opened this issue Oct 30, 2019 · 6 comments
Closed

[Feature Request] Support for printing #94

cf-sewe opened this issue Oct 30, 2019 · 6 comments
Labels
enhancement New feature or request

Comments

@cf-sewe
Copy link

cf-sewe commented Oct 30, 2019

When I print a Hugo page with docs template, this will include the Nav Bar on the left and ToC on the right and leave the main part rather unreadable.

Could you imagine to include some printing support which would hide the mentioned sidebars when printing?

This could be done for example either with:

<link rel="stylesheet" type="text/css" href="print.css" media="print"/>

or

@media print {
 /* print related stuff */
}
@cf-sewe cf-sewe changed the title Support for printing [Feature Request] Support for printing Oct 30, 2019
@alex-shpak
Copy link
Owner

alex-shpak commented Nov 7, 2019

Hi! Would not be hard to add.
Question is what average use expects to print? Only page content? Table of Contents as well?

@alex-shpak alex-shpak added the enhancement New feature or request label Nov 7, 2019
@cf-sewe
Copy link
Author

cf-sewe commented Nov 8, 2019

Question is what average use expects to print? Only page content? Table of Contents as well?

Personally, I would like the ToC also to be printed - if its not disabled by bookToc: false option.
The print location for the ToC ideally would be on top of the document before the content.

By the way I came up with this to avoid the need for a proper PDF export, and as you say its a low hanging fruit.

@oshliaer
Copy link
Contributor

oshliaer commented Nov 8, 2019

@alex-shpak I agree with @cf-sewe.

That would be a very nice bonus.

alex-shpak added a commit that referenced this issue Nov 8, 2019
@alex-shpak
Copy link
Owner

alex-shpak commented Nov 8, 2019

I added low hanging fruit part, by hiding everything except content page.
Rearrange of toc will require messing with positioning quite a lot, not sure that it worth it 🤔

@alex-shpak
Copy link
Owner

alex-shpak commented Nov 8, 2019

Well, it went easier than expected. ToC will show at the top of the page. Consider that printing style might migrate to plugins because css is getting too heavy.
image

@cf-sewe
Copy link
Author

cf-sewe commented Nov 9, 2019

Thank you, that was quick! I
And thank you for such great minimalistic and lightweight theme!

@cf-sewe cf-sewe closed this as completed Nov 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants