Skip to content

Commit c7c4051

Browse files
committed
Updates the output of sphinx and the generated config file
1 parent 90b622b commit c7c4051

File tree

1 file changed

+40
-12
lines changed

1 file changed

+40
-12
lines changed

ch04packaging/04documentation.ipynb

Lines changed: 40 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@
182182
"metadata": {},
183183
"source": [
184184
"```\n",
185-
"Welcome to the Sphinx 3.3.0 quickstart utility.\n",
185+
"Welcome to the Sphinx 4.2.0 quickstart utility.\n",
186186
"\n",
187187
"Please enter values for the following settings (just press Enter to\n",
188188
"accept a default value, if one is given in brackets).\n",
@@ -193,15 +193,41 @@
193193
"Either, you use a directory \"_build\" within the root path, or you separate\n",
194194
"\"source\" and \"build\" directories within the root path.\n",
195195
"> Separate source and build directories (y/n) [n]:\n",
196+
"\n",
197+
"The project name will occur in several places in the built documentation.\n",
198+
"> Project name: Greetings\n",
199+
"> Author name(s): James Hetherington\n",
200+
"> Project release []: 0.1\n",
201+
"\n",
202+
"If the documents are to be written in a language other than English,\n",
203+
"you can select a language here by its language code. Sphinx will then\n",
204+
"translate text that it generates into that language.\n",
205+
"\n",
206+
"For a list of supported codes, see\n",
207+
"https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-language.\n",
208+
"> Project language [en]:\n",
209+
"\n",
210+
"Creating file ./conf.py.\n",
211+
"Creating file ./index.rst.\n",
212+
"Creating file ./Makefile.\n",
213+
"Creating file ./make.bat.\n",
214+
"\n",
215+
"Finished: An initial directory structure has been created.\n",
216+
"\n",
217+
"You should now populate your master file /tmp/index.rst and create other documentation\n",
218+
"source files. Use the Makefile to build the docs, like so:\n",
219+
" make builder\n",
220+
"where \"builder\" is one of the supported builders, e.g. html, latex or linkcheck.\n",
196221
"```"
197222
]
198223
},
199224
{
200225
"cell_type": "markdown",
201226
"metadata": {},
202227
"source": [
203-
"and then look at and adapt the generated config, a file called\n",
204-
"conf.py in the root of the project. This contains the project's Sphinx configuration, as Python variables:"
228+
"and then look at and adapt the generated config - a file called\n",
229+
"`conf.py` in the root of the project - with, for example, the extensions we want to use.\n",
230+
"This config file contains the project's Sphinx configuration, as Python variables:"
205231
]
206232
},
207233
{
@@ -263,29 +289,31 @@
263289
"templates_path = ['_templates']\n",
264290
"source_suffix = '.rst'\n",
265291
"master_doc = 'index'\n",
266-
"project = u'Greetings'\n",
267-
"copyright = u'2014, James Hetherington'\n",
292+
"project = 'Greetings'\n",
293+
"copyright = '2014, James Hetherington'\n",
268294
"version = '0.1'\n",
269295
"release = '0.1'\n",
270-
"exclude_patterns = ['_build']\n",
296+
"exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']\n",
297+
"html_theme = 'alabaster'\n",
298+
"html_static_path = ['_static']\n",
271299
"pygments_style = 'sphinx'\n",
272300
"htmlhelp_basename = 'Greetingsdoc'\n",
273301
"latex_elements = {\n",
274302
"}\n",
275303
"\n",
276304
"latex_documents = [\n",
277-
" ('index', 'Greetings.tex', u'Greetings Documentation',\n",
278-
" u'James Hetherington', 'manual'),\n",
305+
" ('index', 'Greetings.tex', 'Greetings Documentation',\n",
306+
" 'James Hetherington', 'manual'),\n",
279307
"]\n",
280308
"\n",
281309
"man_pages = [\n",
282-
" ('index', 'greetings', u'Greetings Documentation',\n",
283-
" [u'James Hetherington'], 1)\n",
310+
" ('index', 'greetings', 'Greetings Documentation',\n",
311+
" ['James Hetherington'], 1)\n",
284312
"]\n",
285313
"\n",
286314
"texinfo_documents = [\n",
287315
" ('index', 'Greetings', u'Greetings Documentation',\n",
288-
" u'James Hetherington', 'Greetings', 'One line description of project.',\n",
316+
" 'James Hetherington', 'Greetings', 'One line description of project.',\n",
289317
" 'Miscellaneous'),\n",
290318
"]"
291319
]
@@ -302,7 +330,7 @@
302330
"metadata": {},
303331
"source": [
304332
"\n",
305-
"Sphinx uses [RestructuredText](http://docutils.sourceforge.net/rst.html) another wiki markup format similar to Markdown.\n",
333+
"Sphinx uses [RestructuredText](https://docutils.sourceforge.io/rst.html) another wiki markup format similar to Markdown.\n",
306334
"\n",
307335
"You define an \"index.rst\" file to contain any preamble text you want. The rest is autogenerated by `sphinx-quickstart`\n",
308336
"\n",

0 commit comments

Comments
 (0)