mirror of
https://github.com/jupyter/notebook.git
synced 2025-01-30 12:11:32 +08:00
Implement @takluyver's magic RTD executor 💀
This commit is contained in:
parent
38c6fffd8d
commit
1e7c865cba
@ -1,5 +1,6 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
import os.path
|
||||
from qtconsole.qtconsoleapp import JupyterQtConsoleApp
|
||||
|
||||
header = """\
|
||||
@ -34,6 +35,8 @@ enter::
|
||||
|
||||
"""
|
||||
|
||||
with open("source/config.rst", 'w') as f:
|
||||
destination = os.path.join(os.path.dirname(__file__), 'source/config.rst')
|
||||
|
||||
with open(destination, 'w') as f:
|
||||
f.write(header)
|
||||
f.write(JupyterQtConsoleApp().document_config_options())
|
||||
|
@ -22,6 +22,13 @@ import shlex
|
||||
# documentation root, use os.path.abspath to make it absolute, like shown here.
|
||||
#sys.path.insert(0, os.path.abspath('.'))
|
||||
|
||||
if os.environ.get('READTHEDOCS', ''):
|
||||
|
||||
# Readthedocs doesn't run our Makefile, so we do this to force it to generate
|
||||
# the config docs.
|
||||
with open('../autogen_config.py') as f:
|
||||
exec(compile(f.read(), '../autogen_config.py', 'exec'), {})
|
||||
|
||||
# -- General configuration ------------------------------------------------
|
||||
|
||||
# If your documentation needs a minimal Sphinx version, state it here.
|
||||
|
Loading…
Reference in New Issue
Block a user