Save Web Pages As Single HTML Files For Offline Use With Monolith (Console)

Monolith is a command line tool to save any web page as a single HTML file that contains everything needed to render web page locally, without needing a working Internet connection.

Use this to save web pages containing documentation, wiki articles, and anything else that interests you, for local/offline use. Since the web pages are saved in plain HTML, use a tool that can search in files to quickly find the web page you're looking for.

Unlike the regular "Save page as" (or Ctrl + s) option provided by web browsers to save web pages to your computer, which saves web page assets in a folder next to the saved web page, this command line tool retrieves the web page assets and converts them into base64 data URLs, using that in the document instead of the regular URLs. As a result, page assets like Javascript, CSS or images are embedded in the page HTML, so all you need is a web browser to access the locally saved web page.

The tool also provides 2 useful options: -i to remove images from saved web pages, and -j to exclude JavaScript.

Monolith initially used Node.js, but it was very recently (about 11 hours prior to publishing this article) rewritten in Rust. Currently, it works well for basic pages, but there are still a few things that need work. For example, embedding CSS imports and web fonts is not currently supported, though it appears that the developer plans on implementing this soon. With Monolith 2.1.0, CSS imports and web fonts are supported, so such elements are embedded into the saved HTML file.

Post a Comment

Mới hơn Cũ hơn