diff --git a/docs/Makefile b/docs/Makefile index 67eadd57dd..814aed7b51 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -19,7 +19,7 @@ ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) sou # the i18n builder cannot share the environment and doctrees with the others I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source -.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest coverage spelling gettext ipynb2rst +.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest coverage spelling gettext help: @echo "Please use \`make ' where is one of" diff --git a/docs/source/_static/custom.css b/docs/source/_static/custom.css new file mode 100644 index 0000000000..9f38f74209 --- /dev/null +++ b/docs/source/_static/custom.css @@ -0,0 +1,10 @@ +/* 24px margin from readthedocs theme */ +div.nbinput.nblast, +div.nboutput.nblast { + margin-bottom: 19px; /* padding has already 5px */ +} + +/* ... except between code cells! */ +div.nblast + div.nbinput { + margin-top: -19px; +} diff --git a/docs/source/conf.py b/docs/source/conf.py index 44318aae1f..0802ab2d5c 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -118,7 +118,7 @@ # List of patterns, relative to source directory, that match files and # directories to ignore when looking for source files. -exclude_patterns = ['_build'] +exclude_patterns = ['examples/Notebook/.ipynb_checkpoints'] # The reST default role (used for this markup: `text`) to use for all # documents. @@ -186,6 +186,10 @@ # since it is needed to properly generate _static in the build directory html_static_path = ['_static'] +html_context = { + 'css_files': ['_static/custom.css'], +} + # Add any extra paths that contain custom files (such as robots.txt or # .htaccess) here, relative to this directory. These files are copied # directly to the root of the documentation. diff --git a/docs/source/examples/Notebook/examples_index.rst b/docs/source/examples/Notebook/examples_index.rst index 68ebe0bcb3..7d846f739b 100644 --- a/docs/source/examples/Notebook/examples_index.rst +++ b/docs/source/examples/Notebook/examples_index.rst @@ -1,5 +1,7 @@ +`View the original notebooks on nbviewer`__ -`View the original notebooks on nbviewer `__ +__ http://nbviewer.jupyter.org/github/jupyter/notebook/blob/master/ + docs/source/examples/Notebook/ ======== Examples diff --git a/docs/source/index.rst b/docs/source/index.rst index 26d7cfe60f..4d1498ade8 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -36,7 +36,7 @@ The Jupyter notebook public_server security frontend_config - examples/Notebook/rstversions/Distributing Jupyter Extensions as Python Packages.rst + examples/Notebook/Distributing Jupyter Extensions as Python Packages extending/index.rst .. toctree::