diff --git a/docs/source/developers/extensions.rst b/docs/source/developers/extensions.rst index 7e41e4716b..b3c37c11d9 100644 --- a/docs/source/developers/extensions.rst +++ b/docs/source/developers/extensions.rst @@ -109,9 +109,9 @@ An ExtensionApp: - has traits. - is configurable (from file or CLI) - - has a name (see the ``extension_name`` trait). - - has an entrypoint, ``jupyter ``. - - can serve static content from the ``/static//`` endpoint. + - has a name (see the ``name`` trait). + - has an entrypoint, ``jupyter ``. + - can serve static content from the ``/static//`` endpoint. - can add new endpoints to the Jupyter Server. The basic structure of an ExtensionApp is shown below: @@ -124,7 +124,7 @@ The basic structure of an ExtensionApp is shown below: class MyExtensionApp(ExtensionApp): # -------------- Required traits -------------- - extension_name = "myextension" + name = "myextension" extension_url = "/myextension" load_other_extensions = True @@ -163,7 +163,7 @@ Methods Properties -* ``extension_name``: the name of the extension +* ``name``: the name of the extension * ``extension_url``: the default url for this extension—i.e. the landing page for this extension when launched from the CLI. * ``load_other_extensions``: a boolean enabling/disabling other extensions when launching this extension directly. @@ -174,8 +174,8 @@ Properties * ``config``: the ExtensionApp's config object. * ``server_config``: the ServerApp's config object. -* ``extension_name``: the name of the extension to which this handler is linked. -* ``static_url()``: a method that returns the url to static files (prefixed with ``/static/``). +* ``name``: the name of the extension to which this handler is linked. +* ``static_url()``: a method that returns the url to static files (prefixed with ``/static/``). Jupyter Server provides a convenient mixin class for adding these properties to any ``JupyterHandler``. For example, the basic server extension handler in the section above becomes: @@ -202,7 +202,7 @@ Jinja templating from frontend extensions Many Jupyter frontend applications use Jinja for basic HTML templating. Since this is common enough, Jupyter Server provides some extra mixin that integrate Jinja with Jupyter server extensions. -Use ``ExtensionAppJinjaMixin`` to automatically add a Jinja templating environment to an ``ExtensionApp``. This adds a ``_jinja2_env`` setting to Tornado Web Server's settings that will be used by request handlers. +Use ``ExtensionAppJinjaMixin`` to automatically add a Jinja templating environment to an ``ExtensionApp``. This adds a ``_jinja2_env`` setting to Tornado Web Server's settings that will be used by request handlers. .. code-block:: python diff --git a/docs/source/operators/configuring-extensions.rst b/docs/source/operators/configuring-extensions.rst index ac564f85c8..0c8cba3d4a 100644 --- a/docs/source/operators/configuring-extensions.rst +++ b/docs/source/operators/configuring-extensions.rst @@ -26,7 +26,7 @@ Jupyter Server looks for an extension's config file in a set of specific paths. Extension config from file -------------------------- -Jupyter Server expects the file to be named after the extension's name like so: ``jupyter_{extension_name}_config``. For example, the Jupyter Notebook's config file is ``jupyter_notebook_config``. +Jupyter Server expects the file to be named after the extension's name like so: ``jupyter_{name}_config``. For example, the Jupyter Notebook's config file is ``jupyter_notebook_config``. Configuration files can be Python or JSON files.