Skip to content

Update docs with confval definitions #628

@fmigneault

Description

@fmigneault

Description

Currently, configuration settings are defined using envvar definitions with custom structures for default/types. For example:

.. envvar:: MAGPIE_PORT
[:class:`int`]
(Default: ``2001``)
Port URL part of `Magpie` application to rebuild the full :envvar:`MAGPIE_URL`.

Sphinx provides a way to define confval directives, which can be referenced by :confval:`<ref>` (rather than :envvar:`<ref>`).

Using confval allows to directly making use of the directive to define :type: and :default::

.. confval:: the_answer
   :type: ``int`` (a *number*)
   :default: **42**

   This is a setting that controls the value of the answer.

Which would be rendered as:


the_answer
Type:
int (a number)
Default:
42

This is a setting that controls the value of the answer.


References

Metadata

Metadata

Assignees

Labels

docDocumentation improvements or building problemenhancementImprovements in term of performance or behaviour

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions