diff --git a/docs/_static/custom.css b/docs/_static/custom.css index e4bc82ac..0a71a2c1 100644 --- a/docs/_static/custom.css +++ b/docs/_static/custom.css @@ -9,3 +9,7 @@ .strike { text-decoration: line-through; } + +.nbinput .prompt, .nboutput .prompt { + display: none; +} diff --git a/docs/conf.py b/docs/conf.py index a3e68433..65cca159 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -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 `_. -""" % ("%", "%", 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