-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use Furo documentation theme (#1731)
### What kind of change does this PR introduce? * Replaces the `sphinx-rtd-theme` for the `furo` documentation theme * Adapts the `conf.py` to make use of specific variables for `furo` * `pygments` themes and CSS overrides have been added to ensure adequate contrast of documentation elements in both "dark" and "light" modes * Adds alternate logos for the "dark" theme * Updates the docstrings for `xclim/data/__init__.py`, `xclim/core/locales.py`, `xclim/core/formatting.py`, and others * Synchronizes tooling dependency versions (ruff, black, yamllint) * `generate_indicator_docstring` has been adjusted to ensure that information blocks (e.g. `Parameters`, `Returns`) always have newlines between them and that call signature attributes are indented four (4) spaces instead of two (2) * The `pygments`-affected code blocks in `extendxclim.ipynb` have been modified to produce nicer outputs ### Does this PR introduce a breaking change? Yes. - The theme has been completely replaced with `furo`, which gives us a dark mode for free as well as better navigation scroll bars when viewing pages in landscape mode. - Indicator docstrings have been modified to ensure that `Parameters` items conform strictly to `numpy`-docstring format (indentations of four spaces for attributes, changed from two spaces).
- Loading branch information
Showing
33 changed files
with
406 additions
and
171 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,6 +29,7 @@ Contributors | |
* David Caron `@davidcaron <https://github.com/davidcaron>`_ | ||
* Carsten Ehbrecht <[email protected]> `@cehbrecht <https://github.com/cehbrecht>`_ | ||
* Jeremy Fyke `@jeremyfyke <https://github.com/jeremyfyke>`_ | ||
* Sarah Gammon <[email protected]> `@SarahG-579462 <https://github.com/SarahG-579462>`_ | ||
* Tom Keel <[email protected]> `@Thomasjkeel <https://github.com/Thomasjkeel>`_ | ||
* Marie-Pier Labonté <[email protected]> `@marielabonte <https://github.com/marielabonte>`_ | ||
* Ludwig Lierhammer <[email protected]> `@ludwiglierhammer <https://github.com/ludwiglierhammer>`_ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
|
||
/* default xarray theme, this is taken from the injected css that xarray uses. | ||
However, we change it so that it updates in the body, instead of :root, so that it updates with the theme.*/ | ||
html, body { | ||
--xr-font-color0: var(--jp-content-font-color0, rgba(0, 0, 0, 1)); | ||
--xr-font-color2: var(--jp-content-font-color2, rgba(0, 0, 0, 0.54)); | ||
--xr-font-color3: var(--jp-content-font-color3, rgba(0, 0, 0, 0.38)); | ||
--xr-border-color: var(--jp-border-color2, #e0e0e0); | ||
--xr-disabled-color: var(--jp-layout-color3, #bdbdbd); | ||
--xr-background-color: var(--jp-layout-color0, white); | ||
--xr-background-color-row-even: var(--jp-layout-color1, white); | ||
--xr-background-color-row-odd: var(--jp-layout-color2, #eeeeee); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
{% extends "!layout.html" %} | ||
{% extends "!base.html" %} | ||
{% set css_files = css_files + ["_static/style.css"] %} | ||
|
||
<!-- Injection of the scripts for generating the indicators page data. | ||
|
@@ -7,7 +7,7 @@ | |
breaks MiniSearch if loaded first. | ||
--> | ||
|
||
{% block scripts %} | ||
{% block site_meta %} | ||
{% if "indicators" in sourcename %} | ||
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/umd/index.min.js"></script> | ||
<script type="text/javascript" src="./_static/indsearch.js"></script> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,11 +2,6 @@ | |
API | ||
=== | ||
|
||
.. contents:: Table of Contents | ||
:depth: 1 | ||
:local: | ||
:backlinks: none | ||
|
||
Indicators | ||
========== | ||
|
||
|
Oops, something went wrong.