Skip to content

Commit

Permalink
Switch to pangeo book theme (#482)
Browse files Browse the repository at this point in the history
* Switch to pangeo book theme

* Update environment.yml

* Update conf.py

* Update conf.py

* Update doc/conf.py

Co-authored-by: Tom Nicholas <35968931+TomNicholas@users.noreply.github.com>

* remove logo from index

* consolidated _static and images, logo tweaks

* Tune code block appearance

* restored code cells

* Update whats new

Co-authored-by: Tom Nicholas <35968931+TomNicholas@users.noreply.github.com>
  • Loading branch information
jbusecke and TomNicholas committed Apr 20, 2022
1 parent cd87c11 commit 3177b79
Show file tree
Hide file tree
Showing 8 changed files with 21 additions and 13 deletions.
21 changes: 15 additions & 6 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,12 @@
"sphinx.ext.extlinks",
"sphinx.ext.viewcode",
"sphinx.ext.intersphinx",
"sphinx_copybutton",
"sphinx_panels",
"numpydoc",
"nbsphinx",
"IPython.sphinxext.ipython_directive",
"IPython.sphinxext.ipython_console_highlighting",
# "IPython.sphinxext.ipython_console_highlighting",
"sphinxcontrib.srclinks",
]

Expand Down Expand Up @@ -162,7 +163,15 @@ def setup(app):
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
# tml_theme = 'default'
html_theme = "pangeo"
html_theme = "pangeo_sphinx_book_theme"
html_theme_options = {
"repository_url": "https://github.com/pangeo-forge/pangeo-forge-recipes",
"repository_branch": "master",
"path_to_docs": "docs",
"use_repository_button": True,
"use_issues_button": True,
"use_edit_page_button": True,
}

# 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
Expand All @@ -173,15 +182,15 @@ def setup(app):
# html_theme_path = []

# The name for this set of Sphinx documents. If None, it defaults to
# "<project> v<release> documentation".
# html_title = None
# "<project> v<version> documentation".
html_title = f"{project} v{version} documentation"

# A shorter title for the navigation bar. Default is the same as html_title.
# html_short_title = None

# The name of an image file (relative to this directory) to place at the top
# of the sidebar.
# html_logo = None
html_logo = "images/logo.png"

# The name of an image file (within the static path) to use as favicon of the
# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
Expand All @@ -207,7 +216,7 @@ def setup(app):
# html_use_smartypants = True

# Custom sidebar templates, maps document names to template names.
html_sidebars = {"index": [], "**": ["localtoc.html", "srclinks.html"]}
# html_sidebars = {"index": [], "**": ["localtoc.html", "srclinks.html"]}
# Additional templates that should be rendered to pages, maps page names to
# template names.
# html_additional_pages = {}
Expand Down
2 changes: 1 addition & 1 deletion doc/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ dependencies:
- pip:
- nbsphinx
- jupyter_client
- sphinx_pangeo_theme
- pangeo-sphinx-book-theme
- sphinx-copybutton
- sphinxcontrib-srclinks
- sphinx-panels
Expand Down
4 changes: 2 additions & 2 deletions doc/grid_ufuncs.rst
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,7 @@ The dask graph in this case is simple, because this is an "embarrasingly paralle
result.data.visualize(optimize_graph=True)
.. image:: _static/parallelize_broadcast.png
.. image:: images/parallelize_broadcast.png
:height: 400px
:alt: Dask task graph for parallelizing along a broadcast dimension

Expand Down Expand Up @@ -437,7 +437,7 @@ The dask graph is more complicated, because each chunk along the core dim needs
result.data.visualize(optimize_graph=True)
.. image:: _static/parallelize_core.png
.. image:: images/parallelize_core.png
:height: 400px
:alt: Dask task graph for parallelizing along a core dimension

Expand Down
File renamed without changes
File renamed without changes
File renamed without changes
4 changes: 0 additions & 4 deletions doc/index.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
.. image:: _static/logo.png

|
xgcm: General Circulation Model Postprocessing with xarray
==========================================================

Expand Down
3 changes: 3 additions & 0 deletions doc/whats-new.rst
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ Internal Changes
Documentation
~~~~~~~~~~~~~

- Switch to pangeo-book-scheme (:pull:`482`).
By `Julius Busecke <https://github.com/jbusecke>`_.

- Add CITATION.cff file (:pull:`450`).
By `Julius Busecke <https://github.com/jbusecke>`_.

Expand Down

0 comments on commit 3177b79

Please sign in to comment.