Add "orphan" metadata entry to suppress non-toctree-inclusion warnings.

This commit is contained in:
Georg Brandl
2010-02-25 22:49:54 +01:00
parent 870309d038
commit 832e290acd
4 changed files with 15 additions and 3 deletions

View File

@@ -1,3 +1,5 @@
:orphan:
sphinx-build manual page
========================
@@ -72,10 +74,9 @@ Options
<sourcedir>.
-C Specifies that no conf.py file at all is to be used.
Configuration can only be set with the -D option.
-D <setting>=<value> Overrides a setting from the configuration file.
-D <setting=value> Overrides a setting from the configuration file.
-d <path> Path to cached files; defaults to <outdir>/.doctrees.
-A <name>=<value> Passes a value into the HTML templates (only for HTML
builders).
-A <name=value> Passes a value into the HTML templates (only for HTML builders).
-N Prevents colored output.
-q Quiet operation, just prints warnings and errors on stderr.
-Q Very quiet operation, doesn't print anything except for

View File

@@ -1,3 +1,5 @@
:orphan:
sphinx-quickstart manual page
=============================
@@ -20,6 +22,7 @@ See also
:manpage:`sphinx-build(1)`
Author
------

View File

@@ -29,6 +29,12 @@ At the moment, these metadata fields are recognized:
If set, the web application won't display a comment form for a page generated
from this source file.
``orphan``
If set, warnings about this file not being included in any toctree will be
suppressed.
.. versionadded:: 1.0
Meta-information markup
-----------------------

View File

@@ -1549,4 +1549,6 @@ class BuildEnvironment:
if docname == self.config.master_doc:
# the master file is not included anywhere ;)
continue
if 'orphan' in self.metadata[docname]:
continue
self.warn(docname, 'document isn\'t included in any toctree')