From 453f2ce30b6b1947cf2e6293ef487766c7973ca5 Mon Sep 17 00:00:00 2001 From: Carol Willing Date: Wed, 23 Sep 2015 08:25:10 -0700 Subject: [PATCH] Update rtd configs --- docs/Makefile | 2 +- docs/source/conf.py | 4 ++++ docs/source/examples/Notebook/index.rst | 17 +++++++++++++++++ docs/source/index.rst | 25 +------------------------ 4 files changed, 23 insertions(+), 25 deletions(-) create mode 100644 docs/source/examples/Notebook/index.rst diff --git a/docs/Makefile b/docs/Makefile index 2be882e1f..3582146e9 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -62,7 +62,7 @@ source/config.rst: @echo "Created docs for config options" ipynb2rst: - jupyter nbconvert --to rst source/examples/Notebook/*.ipynb --template=source/template --FilesWriter.build_directory=source/examples/Notebook + jupyter nbconvert --to rst source/examples/Notebook/*.ipynb --template=source/template --FilesWriter.build_directory=source/examples/Notebook/rstversions @echo "Converted notebooks to rst" dirhtml: diff --git a/docs/source/conf.py b/docs/source/conf.py index d8d123e70..33635ab15 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -20,8 +20,12 @@ import shlex # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the # documentation root, use os.path.abspath to make it absolute, like shown here. +sys.path.insert(0, os.path.abspath('.')) sys.path.insert(0, os.path.abspath('../..')) +# Check if docs are being built by ReadTheDocs +# If so, generate a config.rst file and populate it with documentation about +# configuration options if os.environ.get('READTHEDOCS', ''): # Readthedocs doesn't run our Makefile, so we do this to force it to generate diff --git a/docs/source/examples/Notebook/index.rst b/docs/source/examples/Notebook/index.rst new file mode 100644 index 000000000..19c60d192 --- /dev/null +++ b/docs/source/examples/Notebook/index.rst @@ -0,0 +1,17 @@ +.. notebook_ipynb: + +Examples and Tutorials +====================== + +.. toctree:: + + rstversions/Examples and Tutorials Index + rstversions/Connecting with the Qt Console + rstversions/Custom Keyboard Shortcuts + rstversions/Importing Notebooks + rstversions/JavaScript Notebook Extensions + rstversions/Notebook Basics + rstversions/Typesetting Equations + rstversions/What is the Jupyter Notebook + rstversions/Working With Markdown Cells + rstversions/Running Code \ No newline at end of file diff --git a/docs/source/index.rst b/docs/source/index.rst index b4a38f71f..60547b3aa 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -27,33 +27,10 @@ The Jupyter notebook :maxdepth: 2 :caption: Community documentation - examples/Notebook/Examples and Tutorials Index + examples/Notebook/index .. toctree:: :maxdepth: 2 :caption: About Jupyter Notebook changelog - - -.. _old-notebook-docs: -.. Comment: The following hidden table of contents enables `make html` - to build without error. If this hidden toctree is removed the build will - error that the old ipynb generated docs are not included in a table of contents. - These older docs can be accessed via the Examples and Tutorials section of - the current docs and the nbviewer link at the top and bottom of that page. - -.. toctree:: - :hidden: - :maxdepth: 1 - - examples/Notebook/Examples and Tutorials Index - examples/Notebook/What is the Jupyter Notebook - examples/Notebook/Notebook Basics - examples/Notebook/Running Code - examples/Notebook/Working With Markdown Cells - examples/Notebook/Custom Keyboard Shortcuts - examples/Notebook/JavaScript Notebook Extensions - examples/Notebook/Importing Notebooks - examples/Notebook/Connecting with the Qt Console - examples/Notebook/Typesetting Equations