Skip to content
Merged
Show file tree
Hide file tree
Changes from 10 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
2 changes: 1 addition & 1 deletion ci/requirements/doc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ dependencies:
- sphinx-autosummary-accessors
- sphinx-book-theme >= 0.0.38
- sphinx-copybutton
- sphinx-panels
- sphinx-design
- sphinx!=4.4.0
- zarr>=2.4
- pip:
Expand Down
97 changes: 97 additions & 0 deletions doc/_static/index_api.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
76 changes: 76 additions & 0 deletions doc/_static/index_contribute.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
66 changes: 66 additions & 0 deletions doc/_static/index_getting_started.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
67 changes: 67 additions & 0 deletions doc/_static/index_user_guide.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions doc/_static/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -261,3 +261,13 @@ body {
.bd-toc .nav > .active > ul {
display: block;
}

/* Main index page overview cards */

.sd-card-img-top {
width: 33% !important;
display: block;
margin-left: auto;
margin-right: auto;
margin-top: 10px;
}
22 changes: 21 additions & 1 deletion doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
from contextlib import suppress

import sphinx_autosummary_accessors
from sphinx.domains.python import PythonDomain
Comment thread
jhamman marked this conversation as resolved.
Outdated

import xarray

Expand Down Expand Up @@ -60,6 +61,8 @@
]
)

nbsphinx_allow_errors = True

# -- General configuration ------------------------------------------------

# If your documentation needs a minimal Sphinx version, state it here.
Expand All @@ -80,12 +83,13 @@
"nbsphinx",
"sphinx_autosummary_accessors",
"sphinx.ext.linkcode",
"sphinx_panels",
"sphinxext.opengraph",
"sphinx_copybutton",
"sphinxext.rediraffe",
"sphinx_design",
Comment thread
andersy005 marked this conversation as resolved.
]


extlinks = {
"issue": ("https://github.com/pydata/xarray/issues/%s", "GH"),
"pull": ("https://github.com/pydata/xarray/pull/%s", "PR"),
Expand Down Expand Up @@ -383,5 +387,21 @@ def html_page_context(app, pagename, templatename, context, doctree):
context["theme_use_edit_page_button"] = False


class PatchedPythonDomain(PythonDomain):
"""
Workaround for `WARNING: more than one target found for 'any' cross-reference`

source: https://github.com/sphinx-doc/sphinx/issues/3866
"""

def resolve_xref(self, env, fromdocname, builder, typ, target, node, contnode):
if "refspecific" in node:
del node["refspecific"]
return super().resolve_xref(
env, fromdocname, builder, typ, target, node, contnode
)

Comment thread
andersy005 marked this conversation as resolved.
Outdated

def setup(app):
app.connect("html-page-context", html_page_context)
app.add_domain(PatchedPythonDomain, override=True)
Comment thread
jhamman marked this conversation as resolved.
Outdated
Loading