Listas de campo¶
As previously discussed, listas de campos são sequências de campos marcados assim:
:fieldname: Field content
Sphinx extends standard docutils behavior for field lists and adds some extra functionality that is covered in this section.
Nota
The values of field lists will be parsed as strings. You cannot use Python collections such as lists or dictionaries.
Metadados File-wide¶
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.
Nota
A field list appearing after the document title will be part of the docinfo as normal and will be displayed in the output.
Special metadata fields¶
O Sphinx
fornece um comportamento personalizado para campos bibliográficos em comparação com os documentos.
No momento esses campos metadados são reconhecidos:
tocdepth
A profundidade máxima para um índice deste arquivo:
:tocdepth: 2
Nota
This metadata effects to the depth of local toctree. But it does not effect to the depth of global toctree. So this would not be change the sidebar of some themes which uses global one.
Novo na versão 0.4.
nocomments
Se definido, o aplicativo da Web não exibirá um formulário de comentários para uma página gerada a partir desse arquivo de origem:
:nocomments:
orphan
Se definido, avisos sobre este arquivo não sendo incluído em qualquer
toctree
serão suprimidos::orphan:
Novo na versão 1.0.
nosearch
If set, full text search for this file is disabled.
:nosearch:
Nota
object search is still available even if nosearch option is set.
Novo na versão 3.0.