I am totally new to this thing. Spent a whole day trying to figure out the "most commonly used" approach. What I want to implement is something like readthedocs.org, but for a private customer (and proprietary project).
Almost all of the FAQs, blog posts, howtos, etc, are describing how to host (publish) documentation either with GitHub pages, either with readthedocs.org (.com)
I've tried to use Sphinx (NB: NOT a "Sphinx Search") locally, and I could quite easily build a sample demo docs, but I don't exactly understand how to host a "searchable" solution, like the one it works on http://www.sphinx-doc.org (seems like it uses readthedocs.org as a search backend, though).
I've tried to deploy readthedocs.org locally, but:
(NB: I was trying it on Windows, and that might explain items 1-2, but not 3, I believe.)
So far it feels like I've run out of ideas..
Any advice will be highly appreciated !
Overall, there are many options for hosting and deploying your site. GitHub Pages, CloudCannon, Read the Docs, Netlify, and Aerobatic are just a few. You can also probably explore custom-built hosting and deployment options available through your company's existing infrastructure.
The only thing you need to host sphinx documentation is a static file server (the search works without a back end, see my answer here.
That said, using a private readthedocs server is probably over-engineering. Just deploy the files to a static file server and point the base URL (e.g. docs.myapp.com
) to the index.html
file.
You can automate the deployment with git hooks.
For the sake of completeness: I am sure it is possible to get a local readthedocs server to build your project. But readthedocs is explicitly not designed for On Premise deployments and you might find it hard to get professional support. I was involved in a scenario where the Dev Ops team decided it's way easier to automate the deployment using their usual set of tools after we struggled with build/performance issues of our local readthedocs instance.
If you want to host static documentation you can do this by setting up a static file server like nginx. Just this file in /etc/nginx/sites-available/default:
server { listen 80 default_server; index index.html index.htm index.nginx-debian.html; server_name _; location /doc/your-docs { root /path/to/docs; } }
We built a simple tool around this concept to selfhost documentation for multiple projects and version them:
https://github.com/docat-org/docat
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With