DEV Community

naveennamani
naveennamani

Posted on • Edited on • Originally published at naveennamani.github.io

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
https://naveennamani.github.io/blog and
for projects like this.

Top comments (3)

Collapse
 
daviekaranja profile image
Davie Karanja • Edited

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


$ sh scripts/build-docs.sh

  • python ./scripts/docs.py build-all Traceback (most recent call last): File "C:\offline_docs\fastapi\fastapi\scripts\docs.py", line 9, in import mkdocs.commands.build 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?

Collapse
 
naveennamani profile image
naveennamani

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
gitpod.io/#https://github.com/nave...

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

Collapse
 
naveennamani profile image
naveennamani

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. :)