How to View Code Documentation Offline with Zeal

Zeal Welcome Page

If you’ve written any code, you probably agree that programming involves reading documentation, lots of it. In many cases, the time spent reading documentation and other code exceeds the actual time writing code. And since that documentation is more often than not accessed on the Web, a significant portion of time is wasted finding the information you’re looking for and waiting for it to load. These small delays can be frustrating, especially with slower connections, and can quickly add up to minutes, or hours, of lost productivity. Besides, a constant Internet connection, which is not always available, is required to access that information,

Fortunately, you can use Zeal, an offline documentation browser, to store programming language and software documentation on your computer and access it quickly and effectively. Zeal uses document sets (docsets) provided by Dash. They include documentation for many programming and scripting languages and libraries, as well as various software such as Docker, Nginx, WordPress and ElasticSearch, to name a few.

Here’s how to install, use and customize Zeal on Linux.

Installing Zeal

Zeal is available in the software repositories of many Linux distributions, so you should install it using your native package manager if possible.

On Ubuntu, Linux Mint, and Debian:

On Arch Linux:

On Gentoo:

On Fedora:

Using Zeal

You can launch Zeal from your application menu/launcher or from a command-line terminal by typing zeal.

Zeal Initial Gui

Zeal does not include any documentation by default. To view the available docsets, go to “Tools -> Docsets” and open the “Available” tab.

Zeal Available Docsets 1

Select the docsets you want to store and click on “Download.” Once fetched, document sets are displayed in the upper-left pane in a navigable hierarchical structure. When applicable, the lower-left pane displays shortcuts to the elements of the current document page.

Zeal Docset Hierarchy

You can search all docsets by entering a query or a specific docset with the syntax docset:query. For instance, to search for Python’s re.match function, you would enter python:re.match.

Note: with the compound search syntax (that is docset:query), the docset part is case sensitive, and the query part is case insensitive.

Zeal Example Query

Customizing Zeal

Fonts

You can configure Zeal’s appearance to your liking with fonts and font sizes.

To do so, go to “Edit -> Preferences -> Content” and then select a default font family and specific fonts for each font family.

Zeal Preferences Appearance

Dark Mode

Zeal also provides a dark mode (in “Edit -> Preferences -> Content”), though it is only applied to document contents and not to the surrounding graphical interface as you can see in the following screenshot.

Zeal Interface Dark 1

User-Defined CSS

If you are going to be using Zeal on a regular basis, then it’s worth devoting some time to tweak it to your own taste. You can use a custom stylesheet for greater and finer control over the appearance of documents.

Create a new CSS file using your text editor:

Enter the desired CSS rule sets, for example:

Go to the “Edit -> Preferences -> Content -> Custom CSS” file to select the newly created CSS file. After saving your settings, the changes will be visible immediately. The following screenshot shows Zeal after applying the above CSS.

Zeal Custom Appearance 1

Conclusion

Zeal is a great tool for programmers and system administrators who tend to access documentation frequently. Since it stores documents locally, it can save you time and allow you to better focus on the work at hand. Additionally, unlike Web documents, it supports user-defined stylesheets for fine control over document appearance.

Leave a Comment

Yeah! You've decided to leave a comment. That's fantastic! Check out our comment policy here. Let's have a personal and meaningful conversation.