Skip to content

Commit d84d13b

Browse files
authored
Switch to furo theme (#282)
1 parent 1e3eb0a commit d84d13b

File tree

4 files changed

+24
-19
lines changed

4 files changed

+24
-19
lines changed

ci/doc.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ dependencies:
1818
- pandas
1919
- pooch
2020
- pint
21+
- furo
2122
- pip:
2223
- git+https://github.com/xarray-contrib/cf-xarray
2324
- myst_nb
24-
- sphinx-book-theme

doc/_static/style.css

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
.xr-wrap {
2+
font-size: 0.85em;
3+
margin-left: 1.25em;
4+
padding-left: 1.25em;
5+
border-left: thin var(--color-foreground-muted) solid;
6+
}
7+
.xr-array-wrap, .xr-var-data, .xr-var-preview {
8+
font-size: 0.9em;
9+
}

doc/conf.py

Lines changed: 8 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@
132132
# show_authors = False
133133

134134
# The name of the Pygments (syntax highlighting) style to use.
135-
pygments_style = "sphinx"
135+
pygments_style = "igor"
136136

137137
# A list of ignored prefixes for module index sorting.
138138
# modindex_common_prefix = []
@@ -145,28 +145,19 @@
145145

146146
# The theme to use for HTML and HTML Help pages. See the documentation for
147147
# a list of builtin themes.
148-
html_theme = "sphinx_book_theme"
148+
html_theme = "furo"
149149
# html_theme = "pydata_sphinx_theme"
150150

151151
# Theme options are theme-specific and customize the look and feel of a theme
152152
# further. For a list of options available for each theme, see the
153153
# documentation.
154+
css_vars = {"admonition-font-size": "0.9rem", "font-size--small": "92%"}
154155
html_theme_options = dict(
155-
# analytics_id='' this is configured in rtfd.io
156-
# canonical_url="",
157-
repository_url="https://github.com/xarray-contrib/cf-xarray",
158-
repository_branch="main",
159-
path_to_docs="doc",
160-
use_edit_page_button=True,
161-
use_repository_button=True,
162-
use_issues_button=True,
163-
home_page_in_toc=False,
164-
extra_navbar="",
165-
navbar_footer_text="",
166-
navbar_end="search-field.html",
156+
sidebar_hide_name=True,
157+
light_css_variables=css_vars,
158+
dark_css_variables=css_vars,
167159
)
168160

169-
170161
html_context = {
171162
"github_user": "xarray-contrib",
172163
"github_repo": "cf-xarray",
@@ -197,6 +188,8 @@
197188
# relative to this directory. They are copied after the builtin static files,
198189
# so a file named "default.css" will overwrite the builtin "default.css".
199190
html_static_path = ["_static"]
191+
html_css_files = ["style.css"]
192+
200193

201194
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
202195
# using the given strftime format.

doc/examples/introduction.ipynb

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,10 @@
2222
"source": [
2323
"import cf_xarray as cfxr\n",
2424
"import numpy as np\n",
25-
"import xarray as xr"
25+
"import xarray as xr\n",
26+
"\n",
27+
"# For this notebooks, it's nicer if we don't show the array values by default\n",
28+
"xr.set_options(display_expand_data=False)"
2629
]
2730
},
2831
{
@@ -1023,7 +1026,7 @@
10231026
],
10241027
"metadata": {
10251028
"kernelspec": {
1026-
"display_name": "Python 3",
1029+
"display_name": "Python 3 (ipykernel)",
10271030
"language": "python",
10281031
"name": "python3"
10291032
},
@@ -1037,7 +1040,7 @@
10371040
"name": "python",
10381041
"nbconvert_exporter": "python",
10391042
"pygments_lexer": "ipython3",
1040-
"version": "3.8.10"
1043+
"version": "3.9.9"
10411044
},
10421045
"toc": {
10431046
"base_numbering": 1,

0 commit comments

Comments
 (0)