Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs/global-nav #119

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all 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
1 change: 1 addition & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

- Changes documentation configuration settings to make this consistent with other asdf-related projects [#117]
- Fix typo in latex logo path [#118]
- Adds global navigation in docs top bar [#119]

0.5.0 (2024-03-08)
------------------
Expand Down
10 changes: 10 additions & 0 deletions docs/_static/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,13 @@ div.highlight-python {
div.highlight-python:active {
width: 150%
}

/* Top Banner Navigation
-------------------------------------------------- */
.announcement-content a {
padding-right: 1em;
}

.announcement-content a:hover {
color: fuchsia;
}
23 changes: 17 additions & 6 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
# main project
"asdf-website": ("https://www.asdf-format.org/en/latest", None),
# other subprojects
"asdf": ("https://asdf.readthedocs.io/en/latest/", None),
"asdf": ("https://www.asdf-format.org/projects/asdf/en/stable", None),
"asdf-coordinates-schemas": ("https://www.asdf-format.org/projects/asdf-coordinates-schemas/en/latest/", None),
"asdf-standard": ("https://asdf-standard.readthedocs.io/en/latest/", None),
"asdf-wcs-schemas": ("https://www.asdf-format.org/projects/asdf-wcs-schemas/en/latest/", None),
Expand Down Expand Up @@ -105,6 +105,16 @@
# the options for this theme can be modified by overriding some of the
# variables set in the global configuration. The variables set in the
# global configuration are listed below, commented out.
# Adds a global navigation in the topbar - consistent across subprojects

globalnavlinks = {
"ASDF Projects": "https://www.asdf-format.org",
"Tutorials": "https://www.asdf-format.org/en/latest/tutorials/index.html",
"Community": "https://www.asdf-format.org/en/latest/community/index.html",
}
topbanner = ""
for text, link in globalnavlinks.items():
topbanner += f"<a href={link}>{text}</a>"

# Add any paths that contain custom themes here, relative to this directory.
# To use a different custom theme, add the directory containing the theme.
Expand All @@ -129,8 +139,10 @@
html_theme_options = {
"light_logo": "images/logo-light-mode.png",
"dark_logo": "images/logo-dark-mode.png",
"announcement": topbanner,
}


pygments_style = "monokai"
# NB Dark style pygments is furo-specific at this time
pygments_dark_style = "monokai"
Expand All @@ -140,7 +152,7 @@

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

# Output file base name for HTML help builder.
htmlhelp_basename = project + "doc"
Expand Down Expand Up @@ -179,13 +191,12 @@
extensions += ["sphinx_asdf", "sphinx.ext.intersphinx", "sphinx.ext.extlinks"] # noqa


def setup(app):
app.add_css_file("custom.css")


# -- sphinx_asdf configuration ---------------------------------------------

# Top-level directory containing ASDF schemas (relative to current directory)
asdf_schema_path = "../resources/stsci.edu"
# This is the prefix common to all schema IDs in this repository
asdf_schema_standard_prefix = "schemas"

def setup(app):
app.add_css_file("custom.css")
9 changes: 1 addition & 8 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ ASDF Transform Schemas
The ASDF Transform Schemas define a set of schemas for serializing the models defined by
:ref:`astropy.modeling <astropy:astropy-modeling>` for the ASDF file format. These schemas
are based upon the schemas in the :ref:`ASDF Standard <asdf-standard:asdf-standard>` and
are packaged for use by the :ref:`ASDF <asdf:asdf>` library.
are packaged for use by the :ref:`asdf <asdf:asdf>` library.

.. note::
This is only a schema package, to use these schemas to serialize astropy models,
Expand Down Expand Up @@ -38,10 +38,3 @@ Developer Resources

contributing.rst
changes.rst

Index
=====

* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`