diff --git a/doc/extdev/appapi.rst b/doc/extdev/appapi.rst index 9feaa0884..e7f641e43 100644 --- a/doc/extdev/appapi.rst +++ b/doc/extdev/appapi.rst @@ -686,16 +686,9 @@ Use this to adapt your extension to API changes in Sphinx. The Config object ----------------- -.. module:: sphinx.config +.. currentmodule:: sphinx.config -.. class:: Config - - The config object makes the values of all config values available as - attributes. - - It is available as the ``config`` attribute on the application and - environment objects. For example, to get the value of :confval:`language`, - use either ``app.config.language`` or ``env.config.language``. +.. autoclass:: Config .. _template-bridge: diff --git a/sphinx/config.py b/sphinx/config.py index 1b3f51a6e..18da9eb9a 100644 --- a/sphinx/config.py +++ b/sphinx/config.py @@ -78,8 +78,15 @@ if PY2: class Config(object): - """ - Configuration file abstraction. + """Configuration file abstraction. + + The config object makes the values of all config values available as + attributes. + + It is exposed via the :py:attr:`sphinx.application.Application.config` and + :py:attr:`sphinx.environment.Environment.config` attributes. For example, + to get the value of :confval:`language`, use either ``app.config.language`` + or ``env.config.language``. """ # the values are: (default, what needs to be rebuilt if changed)