DEV Community


Posted on • Updated on • Originally published at

Introducing offline-docs, collection of scripts to generate offline documentation of open-source projects

Offline-docs is a repo with collection of scripts to build offline documentation for your favourite frameworks/libraries. Simply search 🔎 for your tool, copy/paste the build commands and enjoy.

But why? / Motivation

Learning or working on a new language often requires referring to the official docs multiple times. With the rise of Static Site Generation (SSG) many documentation sites are now open-source and can be built for offline usage. This project aims to collect all such websites and the build commands to have a knowledge of widely used SSG tools.

How to use this repo

Details about each tool such as website, source code repo and build commands are given in README page of the repo. Once you are on the repo

  1. Find the framework/library/tool for which you want to build the documentation (you can search in the Available Tools or with Ctrl+F)
  2. Open a new terminal
  3. Copy paste the build commands shown for the tool
  4. Open the output dir as mentioned in the last command (or) unarchive the .tar.gz file in your preferred location and rename the folder
  5. Use any static site serving tools like serve (npm package) or simply python -m http.server. (We recommend using serve package)

Currently available tools

  • Blockchain
    • ethereum
    • hardhat
  • Build tools
    • vite
  • CSS frameworks/libraries
    • daisyui
    • material ui
    • tailwindcss
  • Frontend javascript frameworks/libraries
    • reactjs
    • vuejs v3
  • Javascript testing libraries
    • chaijs
    • mochajs
  • Other
    • eslint

Many more websites are coming soon (including Mozilla Developer Network (mdn) 😉). So, go to the repository, create a star ⭐ and show your love ❤️ towards the project.

Thanks for your time!

Visit my blog for latest articles related to web development and
for projects like this.

Top comments (3)

daviekaranja profile image
Davie Karanja • Edited

been having issues creating the FastAPI documentation, I get the following error

$ sh scripts/

  • python ./scripts/ build-all Traceback (most recent call last): File "C:\offline_docs\fastapi\fastapi\scripts\", line 9, in import ModuleNotFoundError: No module named 'mkdocs' _________________________________________________________________________

I've tried a pip install mkdocs but doesn't resolve the issue, my system is:
Windows 11 pro
python 3.10.4

what could be the problem?

naveennamani profile image

Have you installed the packages using flit as mentioned in the script?
I've tried with python 3.9 on win10, and didn't faced any issue when running the script.
Try flit install --extras doc if the --user option is creating any error.
I'll upgrade to python 3.10.4 to see if the issue is with the python packages.

Easiest solution: I've tested all my scripts in a gitpod instance, so you can just open this empty repo in gitpod and run all the commands

If you still face any issue, don't hesitate to create an issue in my repo or continue commenting here.

naveennamani profile image

I'm currently working on an update which will let you open the naveennamani/offline-docs repo in gitpod and you can directly select the project you want to build. Stay tuned and watch the repo for useful updates. :)