Printing Markdown files on GitHub
GitHub displays Markdown files so nicely, it’s a shame there is no print view where all the toolbars etc. are hidden. Note that printing doesn’t necessarily mean that paper is involved. For example, on Mac OS X, you can print to PDF files.
This blog post explains three ways of printing Markdown files that are hosted on GitHub:
- Markdown tools: such as kramdown can be used to turn Markdown files into HTML files that can be printed.
- Safari’s Reader mode : With many pages, Safari displays a “Reader” button in the address bar. Clicking it usually removes all clutter around content. You can print a page in Reader mode. Disadvantage of this solution (especially compared to the next one): You lose most of the syntax highlighting of source code.
- Bookmarklet : Create a bookmark with the following URL, click it and everything around the content is removed.
The above approaches work, e.g., with project readme files. I’ve tested them with the following file: “ServiceWorkers Explained
” by Alex Russell.
- Tip: clutter-free web content via Safari Reader