Skip to content

Commit

Permalink
Switch to furo theme (#282)
Browse files Browse the repository at this point in the history
  • Loading branch information
dcherian authored Jan 10, 2022
1 parent 1e3eb0a commit d84d13b
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 19 deletions.
2 changes: 1 addition & 1 deletion ci/doc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ dependencies:
- pandas
- pooch
- pint
- furo
- pip:
- git+https://github.com/xarray-contrib/cf-xarray
- myst_nb
- sphinx-book-theme
9 changes: 9 additions & 0 deletions doc/_static/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
.xr-wrap {
font-size: 0.85em;
margin-left: 1.25em;
padding-left: 1.25em;
border-left: thin var(--color-foreground-muted) solid;
}
.xr-array-wrap, .xr-var-data, .xr-var-preview {
font-size: 0.9em;
}
23 changes: 8 additions & 15 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@
# show_authors = False

# The name of the Pygments (syntax highlighting) style to use.
pygments_style = "sphinx"
pygments_style = "igor"

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

# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
html_theme = "sphinx_book_theme"
html_theme = "furo"
# 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.
css_vars = {"admonition-font-size": "0.9rem", "font-size--small": "92%"}
html_theme_options = dict(
# analytics_id='' this is configured in rtfd.io
# canonical_url="",
repository_url="https://github.com/xarray-contrib/cf-xarray",
repository_branch="main",
path_to_docs="doc",
use_edit_page_button=True,
use_repository_button=True,
use_issues_button=True,
home_page_in_toc=False,
extra_navbar="",
navbar_footer_text="",
navbar_end="search-field.html",
sidebar_hide_name=True,
light_css_variables=css_vars,
dark_css_variables=css_vars,
)


html_context = {
"github_user": "xarray-contrib",
"github_repo": "cf-xarray",
Expand Down Expand Up @@ -197,6 +188,8 @@
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ["_static"]
html_css_files = ["style.css"]


# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
# using the given strftime format.
Expand Down
9 changes: 6 additions & 3 deletions doc/examples/introduction.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,10 @@
"source": [
"import cf_xarray as cfxr\n",
"import numpy as np\n",
"import xarray as xr"
"import xarray as xr\n",
"\n",
"# For this notebooks, it's nicer if we don't show the array values by default\n",
"xr.set_options(display_expand_data=False)"
]
},
{
Expand Down Expand Up @@ -1023,7 +1026,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
Expand All @@ -1037,7 +1040,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.10"
"version": "3.9.9"
},
"toc": {
"base_numbering": 1,
Expand Down

0 comments on commit d84d13b

Please sign in to comment.