From 93cd0882b67eb260274d1880fea834f0e96447dd Mon Sep 17 00:00:00 2001 From: yuvipanda Date: Sun, 12 Aug 2018 09:12:46 -0700 Subject: [PATCH 1/2] Switch back to a venv for docs + fix .circle config --- .circleci/config.yml | 2 +- docs/environment.yml | 9 --------- docs/requirements.txt | 2 ++ 3 files changed, 3 insertions(+), 10 deletions(-) delete mode 100644 docs/environment.yml create mode 100644 docs/requirements.txt diff --git a/.circleci/config.yml b/.circleci/config.yml index d44b81c..fe058b2 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -104,7 +104,7 @@ jobs: name: install dependencies command: | pip install sphinx - pip install -r docs/doc-requirements.txt + pip install -r docs/requirements.txt - save_cache: paths: diff --git a/docs/environment.yml b/docs/environment.yml deleted file mode 100644 index d737594..0000000 --- a/docs/environment.yml +++ /dev/null @@ -1,9 +0,0 @@ -name: tljh -channels: - - conda-forge -dependencies: -- python=3.6 -- traitlets>=4.1 -- sphinx>=1.4, !=1.5.4 -- pip: - - sphinx_copybutton diff --git a/docs/requirements.txt b/docs/requirements.txt new file mode 100644 index 0000000..a22771d --- /dev/null +++ b/docs/requirements.txt @@ -0,0 +1,2 @@ +sphinx>=1.4, !=1.5.4 +sphinx_copybutton From bec0c8b5bb0af09f3d043922e1b4aa834a793f8a Mon Sep 17 00:00:00 2001 From: yuvipanda Date: Sun, 12 Aug 2018 09:22:13 -0700 Subject: [PATCH 2/2] Only set _static doc assets path if dir exists Otherwise this is an error --- docs/conf.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 8f42adf..7ebd706 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -1,4 +1,5 @@ -# Support markdown too +import os + source_suffix = ['.rst'] project = 'The Littlest JupyterHub' @@ -38,7 +39,10 @@ html_theme = 'alabaster' # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, # so a file named "default.css" will overwrite the builtin "default.css". -html_static_path = ['_static'] +# Do this only if _static exists, otherwise this will error +here = os.path.dirname(os.path.abspath(__file__)) +if os.path.exists(os.path.join(here, '_static')): + html_static_path = ['_static'] # Configure the sidebar to be how we want it to be # We don't have 'navigation' here, since it is very cluttered