Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Port to PyData-Sphinx Theme #256

Merged
merged 4 commits into from
Aug 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions CONTRIBUTING.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
Contributing to the Jupyter NbClassic
=====================================
=================================
Contributing to Jupyter NbClassic
=================================

If you're reading this section, you're probably interested in contributing to
Jupyter. Welcome and thanks for your interest in contributing!
Expand Down
2 changes: 1 addition & 1 deletion docs/autogen_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
header = """\
.. _config:


====================================
Config file and command line options
====================================

Expand Down
1 change: 1 addition & 0 deletions docs/doc-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
sphinx>=1.3.6
sphinx-rtd-theme
pydata-sphinx-theme
nbsphinx
sphinxcontrib_github_alt
myst_parser
Expand Down
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>
1 change: 1 addition & 0 deletions docs/source/comms.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
=====
Comms
=====

Expand Down
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
15 changes: 15 additions & 0 deletions docs/source/config_docs.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
=============
Configuration
=============

.. toctree::
:maxdepth: 1
:caption: Configuration

config_overview
config
public_server
security
frontend_config
examples/Notebook/Distributing Jupyter Extensions as Python Packages
extending/index.rst
5 changes: 2 additions & 3 deletions docs/source/config_overview.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
.. _configuration-overview:

======================
Configuration Overview
======================

Expand Down Expand Up @@ -51,7 +50,7 @@ front-end NbClassic client (i.e. the familiar notebook interface).

:ref:`Command line arguments for configuration <config>` settings are documented in the configuration file and the user documentation.

- :ref:`Running a Notebook server <working_remotely>`
- Review the section: :ref:`Running a Notebook server <working_remotely>`
- Related: `Configuring a language kernel <https://ipython.readthedocs.io/en/latest/install/kernel_install.html>`_
to run in the Notebook server enables your server to run other languages, like R or Julia.

Expand Down
17 changes: 17 additions & 0 deletions docs/source/contribute_docs.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
==========
Contribute
==========

.. toctree::
:maxdepth: 1
:caption: Contributor Documentation

contributing
nbclassic_dev_faq
development_faq

.. toctree::
:hidden:

examples/Notebook/nbpackage/mynotebook.ipynb
examples/Notebook/nbpackage/nbs/other.ipynb
2 changes: 0 additions & 2 deletions docs/source/development_faq.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
.. _development_faq:

Developer FAQ
=============

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,6 @@
}
],
"metadata": {
"nbsphinx": {
"execute": "never"
},
"kernelspec": {
"display_name": "Python 3",
"language": "python",
Expand All @@ -123,6 +120,9 @@
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.5.2"
},
"nbsphinx": {
"execute": "never"
}
},
"nbformat": 4,
Expand Down
6 changes: 3 additions & 3 deletions docs/source/examples/Notebook/Custom Keyboard Shortcuts.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -131,9 +131,6 @@
}
],
"metadata": {
"nbsphinx": {
"execute": "never"
},
"kernelspec": {
"display_name": "Python 3",
"language": "python",
Expand All @@ -150,6 +147,9 @@
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.5.2"
},
"nbsphinx": {
"execute": "never"
}
},
"nbformat": 4,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -507,4 +507,4 @@
},
"nbformat": 4,
"nbformat_minor": 1
}
}
6 changes: 3 additions & 3 deletions docs/source/examples/Notebook/Importing Notebooks.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -511,9 +511,6 @@
],
"metadata": {
"gist_id": "6011986",
"nbsphinx": {
"execute": "never"
},
"kernelspec": {
"display_name": "Python 3",
"language": "python",
Expand All @@ -530,6 +527,9 @@
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.5.1+"
},
"nbsphinx": {
"execute": "never"
}
},
"nbformat": 4,
Expand Down
2 changes: 1 addition & 1 deletion docs/source/examples/Notebook/examples_index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ __ https://nbviewer.jupyter.org/github/jupyter/nbclassic/blob/main/
docs/source/examples/Notebook/

.. toctree::
:maxdepth: 2
:maxdepth: 1

What is the Jupyter Notebook
Notebook Basics
Expand Down
1 change: 0 additions & 1 deletion docs/source/examples/Notebook/nbpackage/nbs/other.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
"metadata": {},
"source": [
"### Other notebook\n",
"\n",
"This notebook just defines `bar`"
]
},
Expand Down
1 change: 1 addition & 0 deletions docs/source/extending/bundler_extensions.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
=========================
Custom bundler extensions
=========================

Expand Down
3 changes: 1 addition & 2 deletions docs/source/extending/contents.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
.. _contents_api:

============
Contents API
============

Expand Down
1 change: 1 addition & 0 deletions docs/source/extending/frontend_extensions.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
===========================
Custom front-end extensions
===========================

Expand Down
1 change: 1 addition & 0 deletions docs/source/extending/handlers.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
=======================
Custom request handlers
=======================

Expand Down
1 change: 1 addition & 0 deletions docs/source/extending/keymaps.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
=================
Customize keymaps
=================

Expand Down
1 change: 1 addition & 0 deletions docs/source/extending/savehooks.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
===============
File save hooks
===============

Expand Down
5 changes: 2 additions & 3 deletions docs/source/frontend_config.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
.. _frontend_config:

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

.. note::

Expand Down
36 changes: 11 additions & 25 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,38 +6,24 @@ Jupyter NbClassic

.. toctree::
:maxdepth: 1
:caption: User Documentation
:titlesonly:

nbclassic
notebook
ui_components
examples/Notebook/examples_index.rst
troubleshooting
changelog
comms
user_docs

Information about using and troubleshooting NbClassic as well as examples and changes throughout the history of the project.

.. toctree::
:maxdepth: 1
:caption: Configuration
:titlesonly:

config_docs

config_overview
config
public_server
security
frontend_config
examples/Notebook/Distributing Jupyter Extensions as Python Packages
extending/index.rst
Find out more about configuring NbClassic.

.. toctree::
:maxdepth: 1
:caption: Contributor Documentation
:titlesonly:

contributing
nbclassic_dev_faq
development_faq

.. toctree::
:hidden:
contribute_docs

examples/Notebook/nbpackage/mynotebook.ipynb
examples/Notebook/nbpackage/nbs/other.ipynb
Additional information about contributing to and developing NbClassic.
15 changes: 9 additions & 6 deletions docs/source/nbclassic.rst
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
.. _htmlnotebook:
:html_theme.sidebar_secondary.remove:

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

=================
.. toctree::
:maxdepth: 2

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

Expand Down Expand Up @@ -34,14 +37,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
1 change: 1 addition & 0 deletions docs/source/nbclassic_dev_faq.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
============================
The Development of NbClassic
============================

Expand Down
3 changes: 1 addition & 2 deletions docs/source/notebook.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
.. _htmlnotebook:

====================
The Jupyter Notebook
====================

Expand Down
1 change: 1 addition & 0 deletions docs/source/public_server.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
.. _working_remotely:

=======================================
Running a Jupyter Server with NbClassic
=======================================

Expand Down
Loading