how to share documents created using Sphinx (html version)

861 views
Skip to first unread message

Curiouslearn

unread,
Jan 13, 2011, 2:18:15 PM1/13/11
to sphin...@googlegroups.com
Hello All,

Two questions about sharing Sphinx documentation with others:

(1) Do you know of an easy way of private hosting of Sphinx documents
online (where you can restrict access to it)? Is there a web host or
some solution that makes this possible easily?

(2) If I want to email the documentation to someone, which files do I
need to email? Do I need to send _build, _template and _static
directories. Does the recipient need to have Python?

Thanks,
Bharat

TP

unread,
Jan 13, 2011, 3:27:24 PM1/13/11
to sphin...@googlegroups.com
> --
> You received this message because you are subscribed to the Google Groups "sphinx-dev" group.
> To post to this group, send email to sphin...@googlegroups.com.
> To unsubscribe from this group, send email to sphinx-dev+...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/sphinx-dev?hl=en.
>
>

All you have to do is copy the contents of the _build/html directory
tree to your web host or email it to someone (You can skip the
.buildinfo & objects.inv files if you want). The _static directory is
automatically copied to _build/html/_static as are the processed
template files (.css_t files get converted to .css files).

It's up to your website configuration as to whether those pages are
private or not.

Recipients only need a web browser to view Sphinx generated HTML pages.

Curiouslearn

unread,
Jan 13, 2011, 5:01:37 PM1/13/11
to sphin...@googlegroups.com
@TP Thanks so much for all your responses. Really appreciate it.

Curiouslearn

unread,
Jan 13, 2011, 5:54:20 PM1/13/11
to sphin...@googlegroups.com
Transferring just the _build/html directory works best except that the
math does not compile. I am using Mathjax extension. It shows fine on
my computer but not on my personal website. Everything else (like the
links, search seem to work)

Can someone please help? Thanks.

Best,
Bharat

Kevin Dunn

unread,
Jan 13, 2011, 6:01:54 PM1/13/11
to sphin...@googlegroups.com
On Thu, Jan 13, 2011 at 17:54, Curiouslearn <curiou...@gmail.com> wrote:
> Transferring just the _build/html directory works best except that the
> math does not compile. I am using Mathjax extension. It shows fine on
> my computer but not on my personal website. Everything else (like the
> links, search seem to work)

Hi Bharat,

MathJax has a large overhead (around 100Mb) to transfer. I host a free
MathJax installation - read more about it at
http://mathjax.connectmv.com

Basically all you need to do is set in your Sphinx ``conf.py`` that:

mathjax_path = 'http://mathjax.connectmv.com/MathJax.js'

and as long as you have an internet connection you don't need to worry
about the MathJax files. Otherwise, you will need to copy them along
with your HTML.

The other option is, of course, to use the PNG math extension, which
will create small PNG files that go with your HTML.

Kevin

Curiouslearn

unread,
Jan 13, 2011, 7:18:58 PM1/13/11
to sphin...@googlegroups.com
Kevin, thanks for writing the Mathjax extension. I changed the path to
your suggestion below. It now works great.

Thanks.

Reply all
Reply to author
Forward
0 new messages