How to publish sphinx-generated documentation on bitbucket wiki automatically?
Asked Answered
K

2

23

I have a python package with sphinx-generated documentation (using the automodules feature) and it can be made into a set of static html pages sitting in a _build directory in the git repository of the project. I would like to view this documentation in pretty and private way on bitbucket. It seems the wiki which is a git repo itself might be usable for that.

Is there an easy step of sequences that can make/convert my html documentation into markup and push it to the bitbucket wiki repository?

Kimkimball answered 19/2, 2013 at 0:27 Comment(0)
A
33

Unfortunately this is not really possible...

You can push your _build dir to the wiki repo and create links in the wiki (Home.rst) to your html files like so:

`Sphinx docs <_build/html/index.html>`_

And it will display them but inclusion of _static css/js files won't work, so your docs will look ugly :(

You could also publish your docs as a website on BitBucket but there's no privacy, your docs will be public even if your repo is private, so this is not very useful, then you can just go with read the docs...

Read the docs actually supports privacy so you could add your docs in a private mode and add a Webhook in BitBucket. This unfortunately only works with public repos so not a great solution either...

P.S. There's a reusable app that allows you to privately serve your sphinx docs from django (protected): django-docs ;) And you can build those from your bitbucket *.rst files...

Achieve answered 29/4, 2013 at 8:24 Comment(4)
That looks like a thorough summary of the state of affairs. Thanks.Kimkimball
This looks like it's still valid as of todayWhaleback
This is still valid as of today too. Jan 2020Masterstroke
Still seems valid as of today Dec 2021Isa
A
0

You are able to include custom css files in the static folder. Also you can convert to Myst using rst2myst. (pip install rst-to-myst[sphinx]

Antipathetic answered 14/7, 2022 at 16:59 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.