Skip to content

Documentation in printable format (CSS media queries) #2632

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

Closed
webpack-bot opened this issue Nov 4, 2018 · 4 comments · Fixed by #3093
Closed

Documentation in printable format (CSS media queries) #2632

webpack-bot opened this issue Nov 4, 2018 · 4 comments · Fixed by #3093

Comments

@webpack-bot
Copy link

Feature request

Please add appropriate CSS media queries to allow for printing the documentation.
And please add a web page containing the whole documentation as one single large HTML file, including a TOC.

What is the expected behavior?

The documentation is supposed to be printable; without navigation, comment and other chrome.

What is motivation or use case for adding/changing the behavior?

Learning Webpack in environments where there is neither electricity nor radio reception.

How should this be implemented in your opinion?

Using CSS print media queries and CSS generated content for page numbering / TOC.

Are you willing to work on this yourself?

No, I'm working on other projects.


This issue was moved from webpack/webpack#8331 by @montogeek. Original issue was by @SetTrend.

@EugeneHlushko
Copy link
Member

Hi @SetTrend

Currently we don't have this feature or anyone working on it, because mostly developers have their laptops with them all the time, so offline version of the docs was enough so far.

I can suggest as a workaround to clone this repo and run yarn install && yarn run start

Also it is easy to get latest up do date version once every one-two month by pulling master branch and just in case re-running yarn install before doing yarn run start after the pull. The docs would be available at http://localhost:3000

@SetTrend
Copy link
Contributor

SetTrend commented Nov 5, 2018

The issue is: I'm a consultant, travelling around a lot in a trains to reach my customers. Here in Europe (particularly Germany) that's mainly without any radio reception. My notebook is buried deep down in my luggage and there's not enough room to unpackage my stuff. So offline media is crucial for contractors, I believe.

@EugeneHlushko
Copy link
Member

I clearly understand your point, we would welcome any kick off in the printable version direction if it is done automatically and doesn't mean content duplication (merging *.md pages into one huge text node). When this is done we could introduce a e.g. /print url to display that merged content. Besides that we would need a really tiny piece of print css.

Like the rest of open source, this would need some upvoting in this issue or on the feature voting page and of course contributions to the source code.

@SetTrend
Copy link
Contributor

SetTrend commented Dec 13, 2018

@EugeneHlushko:

I now forked the project and implemented the changes for printing the documentation.

I'm working on a Windows machine, so I cannot build the project. Would you mind checking if everything is working properly?

The feature branch I created for my changes is called "printable-doc".

Here's what I did:

  1. New SASS rules:
    1. All .interactive sections get hidden for printing.
    2. The contributors section gets hidden for printing.
    3. The .footer gets hidden for printing.
    4. The .page-links section gets hidden for printing.
  2. I created a NodeJS script that recursively concatenates all MarkDown files within a folder into large "chapter" files. The new, automatically generated files match the regular expression: "(_\w+)?_all.md".

At this time I have no clue on how to present the generated "*_all.md" files to the user. Perhaps you've got an idea?

Would you mind giving me a feedback on my changes?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants