Skip to content
New issue

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

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

Already on GitHub? # to your account

Fixed hiding of prompt in nbsphinx #110

Merged
merged 2 commits into from
Apr 21, 2020
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
4 changes: 4 additions & 0 deletions docs/_static/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,7 @@
.strike {
text-decoration: line-through;
}

.nbinput .prompt, .nboutput .prompt {
display: none;
}
12 changes: 7 additions & 5 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,14 +109,16 @@
autodoc_docstring_signature = True

# Add a heading to notebooks
doc_path = "https://github.com/discsim/frank/blob/{}".format(branch)
nb_link = "`here <{0}/{1}>`_".format(doc_path, '{{ docname }}')

nbsphinx_prolog = """
{%s set docname = env.doc2path(env.docname, base=None) %s}
.. note:: This tutorial is produced by the Jupyter notebook
`here <https://github.com/discsim/frank/blob/%s/{{ docname }}>`_.
""" % ("%", "%", branch,)
{{% set docname = env.doc2path(env.docname, base=None) %}}
.. note:: This tutorial is produced by the Jupyter notebook {}.

""".format(nb_link)

# nbsphinx
nbsphinx_prompt_width = 0
nbsphinx_timeout = 600
napoleon_use_ivar = True
nbsphinx_allow_errors = True # TODO: remove once notebooks final