Skip to content

Commit

Permalink
🐛 BUG: Create parent folders, when adding notebook to sources (#152)
Browse files Browse the repository at this point in the history
Co-authored-by: Pradyun Gedam <[email protected]>
  • Loading branch information
pradyunsg and pradyunsg authored Aug 7, 2020
1 parent 3b1de4c commit c00e5df
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sphinx_book_theme/launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def add_hub_urls(app, pagename, templatename, context, doctree):
path_ntbk = ntbk_dir.joinpath(pagename).with_suffix(".ipynb")
path_new_notebook = sources_dir.joinpath(pagename).with_suffix(".ipynb")
# Copy the notebook to `_sources` dir so it can be downloaded
path_new_notebook.parent.mkdir(exist_ok=True)
path_new_notebook.parent.mkdir(exist_ok=True, parents=True)
copy2(path_ntbk, path_new_notebook)
context["ipynb_source"] = pagename + ".ipynb"

Expand Down

0 comments on commit c00e5df

Please sign in to comment.