19

我有一个带有 sphinx 生成文档的 python 包(使用 automodules 功能),它可以制作成一组静态 html 页面,位于项目的 git 存储库中的 _build 目录中。我想在 bitbucket 上以漂亮且私密的方式查看此文档。似乎作为 git repo 的 wiki 本身可能可以用于此目的。

是否有一个简单的序列步骤可以将我的 html 文档制作/转换为标记并将其推送到 bitbucket wiki 存储库?

4

1 回答 1

31

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

于 2013-04-29T08:24:09.840 回答