From bf73783ef6b3aebc62ad26d064d4b1075a7c66b9 Mon Sep 17 00:00:00 2001 From: yuvipanda Date: Sat, 28 Jul 2018 13:44:39 -0700 Subject: [PATCH 1/3] Customize theme to have better links in sidebar Fixes #61 --- docs/conf.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/docs/conf.py b/docs/conf.py index 3395052..4da0f73 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -36,3 +36,14 @@ html_theme = 'alabaster' # 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'] + +# Custom Alabaster theme options +html_theme_options = { + 'description': 'A simple JupyterHub distribution for 1-100 users', + 'github_user': 'jupyterhub', + 'github_repo': 'the-littlest-jupyterhub', + 'github_button': 'true', + 'extra_nav_links': { + 'Documentation confusing? File an issue!': 'https://github.com/jupyterhub/the-littlest-jupyterhub/issues' + } +} From ecfe7333099a76af8abe06713d10c41c1b771718 Mon Sep 17 00:00:00 2001 From: yuvipanda Date: Sun, 29 Jul 2018 23:36:56 -0700 Subject: [PATCH 2/3] Set-up sidebar to show nav / about sections --- docs/conf.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/docs/conf.py b/docs/conf.py index 4da0f73..a392300 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -37,12 +37,22 @@ html_theme = 'alabaster' # so a file named "default.css" will overwrite the builtin "default.css". html_static_path = ['_static'] +html_sidebars = { + '**': [ + 'about.html', + 'navigation.html', + 'relations.html', + 'searchbox.html', + 'donate.html', + ] +} # Custom Alabaster theme options html_theme_options = { 'description': 'A simple JupyterHub distribution for 1-100 users', 'github_user': 'jupyterhub', 'github_repo': 'the-littlest-jupyterhub', - 'github_button': 'true', + 'github_button': True, + 'github_banner': True, 'extra_nav_links': { 'Documentation confusing? File an issue!': 'https://github.com/jupyterhub/the-littlest-jupyterhub/issues' } From 72744d390c9e885ca4080b9c3b3f012512bd3396 Mon Sep 17 00:00:00 2001 From: yuvipanda Date: Mon, 30 Jul 2018 10:21:07 -0700 Subject: [PATCH 3/3] Better placement of 'file an issue' link Remove navigation.html from sidebar, since I could not figure out how to control it. The autogenerated links are not very useful --- docs/conf.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index a392300..b60e03b 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -37,10 +37,12 @@ html_theme = 'alabaster' # so a file named "default.css" will overwrite the builtin "default.css". 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 +# and seems to be hard to control. html_sidebars = { '**': [ 'about.html', - 'navigation.html', 'relations.html', 'searchbox.html', 'donate.html', @@ -48,12 +50,13 @@ html_sidebars = { } # Custom Alabaster theme options html_theme_options = { - 'description': 'A simple JupyterHub distribution for 1-100 users', + 'description': """ + A simple JupyterHub distribution for 1-100 users +

+ Documentation confusing? File an issue! + """, 'github_user': 'jupyterhub', 'github_repo': 'the-littlest-jupyterhub', 'github_button': True, 'github_banner': True, - 'extra_nav_links': { - 'Documentation confusing? File an issue!': 'https://github.com/jupyterhub/the-littlest-jupyterhub/issues' - } }