@@ -77,12 +77,13 @@ def _default_path_info(self):
7777
7878
7979class ServerProcess (Configurable ):
80- name = Unicode (help = "Name" ).tag (config = True )
80+ name = Unicode (help = "Name of the server" ).tag (config = True )
81+
8182 command = List (
8283 Unicode (),
83- help = """\
84+ help = """
8485 An optional list of strings that should be the full command to be executed.
85- The optional template arguments {{ port}}, {{ unix_socket}} and {{ base_url}}
86+ The optional template arguments ``{ port}``, ``{ unix_socket}`` and ``{ base_url}``
8687 will be substituted with the port or Unix socket path the process should
8788 listen on and the base-url of the notebook.
8889
@@ -97,9 +98,9 @@ class ServerProcess(Configurable):
9798 environment = Union (
9899 [Dict (Unicode ()), Callable ()],
99100 default_value = {},
100- help = """\
101+ help = """
101102 A dictionary of environment variable mappings. As with the command
102- traitlet, {{ port}}, {{ unix_socket}} and {{ base_url}} will be substituted.
103+ traitlet, ``{ port}``, ``{ unix_socket}`` and ``{ base_url}`` will be substituted.
103104
104105 Could also be a callable. It should return a dictionary.
105106 """ ,
@@ -112,7 +113,7 @@ class ServerProcess(Configurable):
112113 absolute_url = Bool (
113114 False ,
114115 help = """
115- Proxy requests default to being rewritten to '/' . If this is True,
116+ Proxy requests default to being rewritten to ``/`` . If this is True,
116117 the absolute URL will be sent to the backend instead.
117118 """ ,
118119 ).tag (config = True )
@@ -155,24 +156,24 @@ class ServerProcess(Configurable):
155156
156157 Keys recognized are:
157158
158- enabled
159- Set to True (default) to make an entry in the launchers. Set to False to have no
160- explicit entry.
159+ `` enabled``
160+ Set to True (default) to make an entry in the launchers. Set to False to have no
161+ explicit entry.
161162
162- icon_path
163- Full path to an svg icon that could be used with a launcher. Currently only used by the
164- JupyterLab launcher
163+ `` icon_path``
164+ Full path to an svg icon that could be used with a launcher. Currently only used by the
165+ JupyterLab launcher
165166
166- title
167- Title to be used for the launcher entry. Defaults to the name of the server if missing.
167+ `` title``
168+ Title to be used for the launcher entry. Defaults to the name of the server if missing.
168169
169- path_info
170- The trailing path that is appended to the user's server URL to access the proxied server.
171- By default it is the name of the server followed by a trailing slash.
170+ `` path_info``
171+ The trailing path that is appended to the user's server URL to access the proxied server.
172+ By default it is the name of the server followed by a trailing slash.
172173
173- category
174- The category for the launcher item. Currently only used by the JupyterLab launcher.
175- By default it is "Notebook".
174+ `` category``
175+ The category for the launcher item. Currently only used by the JupyterLab launcher.
176+ By default it is "Notebook".
176177 """ ,
177178 ).tag (config = True )
178179
@@ -199,7 +200,7 @@ def _default_launcher_entry(self):
199200 default_value = {},
200201 help = """
201202 A dictionary of additional HTTP headers for the proxy request. As with
202- the command traitlet, {{ port}}, {{ unix_socket}} and {{ base_url}} will be substituted.
203+ the command traitlet, ``{ port}``, ``{ unix_socket}`` and ``{ base_url}`` will be substituted.
203204 """ ,
204205 ).tag (config = True )
205206
@@ -213,6 +214,8 @@ def _default_launcher_entry(self):
213214 ``.body``, ``.headers``, ``.code``, or ``.reason`` of the ``response``
214215 argument. For example:
215216
217+ .. code-block::
218+
216219 def dog_to_cat(response):
217220 response.headers["I-Like"] = "tacos"
218221 response.body = response.body.replace(b'dog', b'cat')
@@ -229,6 +232,8 @@ def dog_to_cat(response):
229232 A list or tuple of functions can also be specified for chaining multiple
230233 rewrites. For example:
231234
235+ .. code-block::
236+
232237 def cats_only(response, path):
233238 if path.startswith("/cat-club"):
234239 response.code = 403
0 commit comments