Suppress warnings about documents not included in a toctree

709 views
Skip to first unread message

Richard Dymond

unread,
Mar 4, 2014, 8:59:17 AM3/4/14
to sphinx...@googlegroups.com
My project has HTML documentation and man pages that I build with Sphinx. I'd like to place the source files for both the HTML docs and the man pages in the same source tree, but when I do that, I get warnings when I do 'make html' about the man page source files not being included in any toctree. Is there any way to suppress those warnings?

I've tried adding the man page source filenames to exclude_patterns in conf.py, which does prevent the warnings, but also prevents the man pages from building. I don't want to place the man page source files in a toctree, because I don't want the man pages appearing in the HTML docs.

I notice that Sphinx itself has the man page source files in the same source tree as the other source files, and 'make html' produces no warnings, even though the man page source files are not included in any toctree (as far as I can see). How does that work?

Richard

Luc Saffre

unread,
Mar 4, 2014, 11:24:08 PM3/4/14
to sphinx...@googlegroups.com
Hi Richard,

did you try to add a second toctree with :hidden:?

.. toctree::
webpage1
webpage2

.. toctree::
:hidden:
manpage


Luc
> --
> You received this message because you are subscribed to the Google
> Groups "sphinx-users" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to sphinx-users...@googlegroups.com
> <mailto:sphinx-users...@googlegroups.com>.
> To post to this group, send email to sphinx...@googlegroups.com
> <mailto:sphinx...@googlegroups.com>.
> Visit this group at http://groups.google.com/group/sphinx-users.
> For more options, visit https://groups.google.com/groups/opt_out.

Skipper Seabold

unread,
Mar 4, 2014, 11:28:57 PM3/4/14
to sphinx...@googlegroups.com
Put :orphan: at the top of the documents.

http://sphinx-doc.org/markup/misc.html

Skipper

Richard Dymond

unread,
Mar 5, 2014, 7:52:52 AM3/5/14
to sphinx...@googlegroups.com
On Wednesday, March 5, 2014 12:24:08 AM UTC-4, Luc Saffre wrote:
Hi Richard,

did you try to add a second toctree with :hidden:?

.. toctree::
   webpage1
   webpage2

.. toctree::
   :hidden:
   manpage

Hi Luc

Yes, I did try that, but the man pages still ended up being built as HTML documents. They didn't appear in any visible TOC, but they were accessible by repeatedly pressing 'next'.

Richard

Richard Dymond

unread,
Mar 5, 2014, 7:54:50 AM3/5/14
to sphinx...@googlegroups.com

On Wednesday, March 5, 2014 12:28:57 AM UTC-4, jsseabold wrote:
Put :orphan: at the top of the documents.

http://sphinx-doc.org/markup/misc.html

That's it! (That's the way it's done in the Sphinx documentation.)

Thanks!

Richard
Reply all
Reply to author
Forward
0 new messages