Listes de champs

As previously discussed, field lists are sequences of fields marked up like this:

:fieldname: Field content

Sphinx extends standard docutils behavior for field lists and adds some extra functionality that is covered in this section.

Note

The values of field lists will be parsed as strings. You cannot use Python collections such as lists or dictionaries.

File-wide metadata

A field list near the top of a file is normally parsed by docutils as the docinfo and shown on the page. However, in Sphinx, a field list preceding any other markup is moved from the docinfo to the Sphinx environment as document metadata, and is not displayed in the output.

Note

A field list appearing after the document title will be part of the docinfo as normal and will be displayed in the output.

Champs de métadonnées spéciaux

Sphinx provides custom behavior for bibliographic fields compared to docutils.

Actuellement, les champs de métadonnées suivants sont reconnus:

tocdepth

Profondeur maximale de la table des matières de ce fichier.

:tocdepth: 2

Note

Cette métadonnée est effective sur la profondeur de la table des matières locale. Mais il n’a aucun effet sur la profondeur de la table des matières globale. Ainsi, elle ne modifiera pas la barre latérale des thèmes qui utilisent la table de matières globale.

Added in version 0.4.

nocomments

If set, the web application won’t display a comment form for a page generated from this source file.

:nocomments:
orphan

If set, warnings about this file not being included in any toctree will be suppressed.

:orphan:

Added in version 1.0.

nosearch

If set, full text search for this file is disabled.

:nosearch:

Note

object search is still available even if nosearch option is set.

Added in version 3.0.