Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor nbsphinx-related tuning #1266

Merged
merged 6 commits into from
Apr 5, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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 <target>' where <target> is one of"
Expand Down
10 changes: 10 additions & 0 deletions docs/source/_static/custom.css
Original file line number Diff line number Diff line change
@@ -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;
}
6 changes: 5 additions & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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']
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we want to keep _build in the list of ignored patterns ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When building the docs with make html (as described in the docs), the built files end up in docs/build/ and not in docs/source/_build/, so I don't think it's necessary to have latter in the exclude_patterns.

But if you want it there anyway, just say the word, and I'll add it back!

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No problem, thanks for the precision.


# The reST default role (used for this markup: `text`) to use for all
# documents.
Expand Down Expand Up @@ -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.
Expand Down
4 changes: 3 additions & 1 deletion docs/source/examples/Notebook/examples_index.rst
Original file line number Diff line number Diff line change
@@ -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%20and%20Tutorials%20Index.ipynb>`__
__ http://nbviewer.jupyter.org/github/jupyter/notebook/blob/master/
docs/source/examples/Notebook/

========
Examples
Expand Down
2 changes: 1 addition & 1 deletion docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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::
Expand Down