Skip to content

Commit

Permalink
start port to pydata-sphinx theme
Browse files Browse the repository at this point in the history
  • Loading branch information
RRosio committed Aug 1, 2023
1 parent b3692e3 commit 77462c2
Show file tree
Hide file tree
Showing 5 changed files with 64 additions and 9 deletions.
24 changes: 24 additions & 0 deletions docs/source/_templates/sidebar-nav-bs-index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<style>
#bd-docs-nav .toctree-toggle,
#bd-docs-nav .toctree-checkbox {
display: none;
}
#bd-docs-nav .toctree-l1 > a{
font-weight: bold;
}
</style>

<nav class="bd-links" id="bd-docs-nav" aria-label="{{ _('Documentation Contents') }}">
<div class="bd-toc-item navbar-nav">
<!-- Specify a startdepth of 0 instead of default of 1 -->
{{ generate_toctree_html(
"sidebar",
startdepth=0,
show_nav_level=4,
maxdepth=4,
collapse=True,
includehidden=True,
titles_only=True
) }}
</div>
</nav>
33 changes: 30 additions & 3 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,12 +161,37 @@

# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
html_theme = 'sphinx_rtd_theme'
html_theme = "pydata_sphinx_theme"

# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
# documentation.
#html_theme_options = {}
html_theme_options = {
"icon_links": [
{
"name": "PyPI",
"url": "https://pypi.org/project/nbclassic",
"icon": "fa-solid fa-box",
}
],
"use_edit_page_button": True,
"github_url": "https://github.com/jupyter/nbclassic",
"navbar_end": [
# disabled until widget dark variables are available
# "theme-switcher",
"navbar-icon-links",
],
"secondary_sidebar_items": ["edit-this-page", "sourcelink", "search-field.html"]
}

html_context = {
# disabled until widget dark variables are available
"default_mode": "light",
"doc_path": "docs",
"github_repo": "nbclassic",
"github_user": "jupyter",
"github_version": "main",
}

# Add any paths that contain custom themes here, relative to this directory.
#html_theme_path = []
Expand Down Expand Up @@ -209,7 +234,9 @@
#html_use_smartypants = True

# Custom sidebar templates, maps document names to template names.
#html_sidebars = {}
html_sidebars = {
"**": ["sidebar-nav-bs-index.html"]
}

# Additional templates that should be rendered to pages, maps page names to
# template names.
Expand Down
2 changes: 1 addition & 1 deletion docs/source/frontend_config.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.. _frontend_config:

Configuring the NbClassic frontend
=================================
==================================

.. note::

Expand Down
12 changes: 8 additions & 4 deletions docs/source/nbclassic.rst
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
:html_theme.sidebar_secondary.remove:

.. _htmlnotebook:

Jupyter NbClassic
====================

.. toctree::
:maxdepth: 2

Introduction
------------

Expand Down Expand Up @@ -34,14 +38,14 @@ Installation
~~~~~~~~~~~~

Installing from PyPI:
``> pip install nbclassic``
``pip install nbclassic``
This will automatically enable the extension in Jupyter Server.

Launch directly:
``> jupyter nbclassic``
``jupyter nbclassic``

Alternatively, you can run Jupyter Server and visit the `/tree` endpoint:
``> jupyter server``
``jupyter server``

Configuration
~~~~~~~~~~~~~
Expand Down
2 changes: 1 addition & 1 deletion nbclassic/static/base/js/namespace.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ define(function(){
// tree
jglobal('SessionList','tree/js/sessionlist');

Jupyter.version = "1.0.0";
Jupyter.version = "1.1.0.dev0";
Jupyter._target = '_blank';

return Jupyter;
Expand Down

0 comments on commit 77462c2

Please sign in to comment.