Skip to content

Commit 3350b8c

Browse files
committed
Fixes sphinx build and converts link as relative
1 parent 40d2f0e commit 3350b8c

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

_config.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@ redcarpet:
2525
extensions: ["strikethrough","tables"]
2626

2727

28-
include:
29-
- "ch04packaging/greetings/doc/_static"
30-
- "ch04packaging/greetings/doc/_static"
31-
- "ch04packaging/greetings/doc/_modules"
28+
include: # NOTE: This is not a path, but the directories name, wherever they are
29+
- _static
30+
- _modules
31+
3232
exclude:
3333
- vendor/
3434
- Gemfile

ch04packaging/04documentation.ipynb

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -279,6 +279,9 @@
279279
"import sys\n",
280280
"import os\n",
281281
"\n",
282+
"# We need to tell Sphinx where to look for modules\n",
283+
"sys.path.insert(0, os.path.abspath('.'))\n",
284+
"\n",
282285
"extensions = [\n",
283286
" 'sphinx.ext.autodoc', # Support automatic documentation\n",
284287
" 'sphinx.ext.coverage', # Automatically check if functions are documented\n",
@@ -295,7 +298,6 @@
295298
"release = '0.1'\n",
296299
"exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']\n",
297300
"html_theme = 'alabaster'\n",
298-
"html_static_path = ['_static']\n",
299301
"pygments_style = 'sphinx'\n",
300302
"htmlhelp_basename = 'Greetingsdoc'\n",
301303
"latex_elements = {\n",
@@ -397,7 +399,7 @@
397399
"name": "stdout",
398400
"output_type": "stream",
399401
"text": [
400-
"Running Sphinx v1.8.0\n"
402+
"Running Sphinx v4.2.0\n"
401403
]
402404
},
403405
{
@@ -423,7 +425,7 @@
423425
"cell_type": "markdown",
424426
"metadata": {},
425427
"source": [
426-
"Sphinx's output is [html](http://github-pages.ucl.ac.uk/rsd-engineeringcourse/ch04packaging/greetings/doc/index.html). We just created a simple single function's documentation, but Sphinx will create\n",
428+
"Sphinx's output is [html](./greetings/doc/index.html). We just created a simple single function's documentation, but Sphinx will create\n",
427429
"multiple nested pages of documentation automatically for many functions.\n",
428430
"\n",
429431
"\n",

0 commit comments

Comments
 (0)