Search code examples
htmlpython-3.xflaskwebserverpython-sphinx

What is the simplest way to host sphinx documentation (static html) on a local network?


I would like to host sphinx documentation on a local network for a python application I am writing.

I have unsuccessfully tried to host it using the following Flask methods:

  1. How to serve static files in Flask
  2. Flask: How to serve static html?

The above methods either resulted in a 404 or unformatted html (no css, etc)

I've also tried using a simple http server such as python from within the docs/_build/html/ directory (where index.html exists) and only a 404 was achieved.

How can I host this documentation for my local network?


Solution

  • You can simply serve the files using a web server like Apache or Nginx. Some file repository systems can let you browse static sites (Artifactory, for example). You could also use readthedocs.org