Skip to content

Commit

Permalink
furo theme configs, logos, intersphinx subproject links
Browse files Browse the repository at this point in the history
  • Loading branch information
alphasentaurii committed Dec 13, 2024
1 parent 35a6132 commit d6d713a
Show file tree
Hide file tree
Showing 12 changed files with 72 additions and 150 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -132,3 +132,6 @@ dmypy.json

# Ignore generated Sphinx documentation
docs/source/generated/

# Mac OS
.DS_STORE
1 change: 1 addition & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

- Update reference files [#409]
- Remove statement discouraging use of YAML anchors and aliases [#443]
- Documentation theme config changes for new ASDF website [#447]

1.1.1 (2024-03-06)
------------------
Expand Down
Binary file added docs/source/_static/images/favicon.ico
Binary file not shown.
Binary file added docs/source/_static/images/logo-dark-mode.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/source/_static/images/logo-light-mode.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed docs/source/_static/logo.ico
Binary file not shown.
Binary file removed docs/source/_static/logo.pdf
Binary file not shown.
Binary file removed docs/source/_static/logo.png
Binary file not shown.
85 changes: 62 additions & 23 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

project = configuration["name"]
author = f"{configuration['authors'][0]['name']} <{configuration['authors'][0]['email']}>"
copyright = f"{datetime.datetime.now().year}, {configuration['authors'][0]}"
copyright = f"{datetime.datetime.now().year}, {author}"

# The short X.Y version
with open(Path(__file__).parent.parent.parent / "README.md") as readme:
Expand All @@ -30,14 +30,33 @@
# The full version, including alpha/beta/rc tags
release = importlib.metadata.version(configuration["name"])

intersphinx_mapping["asdf"] = ("https://asdf.readthedocs.io/en/latest/", None) # noqa: F405
subproject_mappings = {
# Main project
"asdf-website": ("https://www.asdf-format.org/en/latest/", None),
# Subprojects
"asdf": ("https://asdf.readthedocs.io/en/latest/", None),
"asdf-coordinates-schemas": ("https://www.asdf-format.org/projects/asdf-coordinates-schemas/en/latest/", None),
"asdf-transform-schemas": ("https://www.asdf-format.org/projects/asdf-transform-schemas/en/latest/", None),
"asdf-wcs-schemas": ("https://www.asdf-format.org/projects/asdf-wcs-schemas/en/latest/", None),
}
intersphinx_mapping.update(subproject_mappings) # noqa: F405

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

# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions += ["sphinx.ext.mathjax", "sphinx.ext.ifconfig", "sphinx.ext.graphviz", "sphinx_asdf"] # noqa: F405
additional_extensions = [
"sphinx.ext.mathjax",
"sphinx.ext.ifconfig",
"sphinx.ext.graphviz",
"sphinx.ext.extlinks",
"sphinx_asdf",
]
extensions += additional_extensions # noqa: F405

# The root toctree document.
root_doc = "index"

mathjax_path = "https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"

Expand All @@ -50,9 +69,6 @@
# source_suffix = ['.rst', '.md']
source_suffix = ".rst"

# The root toctree document.
root_doc = "index"

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
#
Expand All @@ -61,7 +77,10 @@
language = "en"

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

# NB Dark style pygments is furo-specific at this time
pygments_dark_style = "monokai"

# The reST default role (used for this markup: `text`) to use for all documents.
default_role = "ref"
Expand All @@ -78,30 +97,41 @@
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
html_theme = "sphinx_rtd_theme"

# html_theme_path = sphinx_bootstrap_theme.get_html_theme_path()

# 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.
#
html_theme_options = {}
html_theme = "furo"

# Add any paths that contain custom static files (such as style sheets) here,
# 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"]

static_dir = os.path.join(os.path.dirname(__file__), "_static") # noqa: F405

# The root toctree document.
root_doc = "index"

master_doc = "index"

# Add any paths that contain custom themes here, relative to this directory.
# html_theme_path = sphinx_bootstrap_theme.get_html_theme_path()
html_theme_path = []

html_additional_pages = {}

# The name of an image file (within the static path) to use as favicon of the
# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
# pixels large.
html_favicon = "_static/logo.ico"
html_logo = "_static/logo.png"
html_favicon = "_static/images/favicon.ico"
html_logo = ""

# 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.
#
html_theme_options = {
"light_logo": "images/logo-light-mode.png",
"dark_logo": "images/logo-dark-mode.png",
}

html_sidebars = {}
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
# using the given strftime format.
html_last_updated_fmt = "%b %d, %Y"
Expand All @@ -125,9 +155,18 @@
# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
html_show_copyright = True

html_context = {"bootswatch_css_custom": ["_static/asdfstandard.css"]}


# Render inheritance diagrams in SVG
graphviz_output_format = "svg"

graphviz_dot_args = [
"-Nfontsize=10",
"-Nfontname=Helvetica Neue, Helvetica, Arial, sans-serif",
"-Efontsize=10",
"-Efontname=Helvetica Neue, Helvetica, Arial, sans-serif",
"-Gbgcolor=white",
"-Gfontsize=10",
"-Gfontname=Helvetica Neue, Helvetica, Arial, sans-serif",
]
# -- Options for HTMLHelp output ---------------------------------------------

# Output file base name for HTML help builder.
Expand Down Expand Up @@ -182,7 +221,7 @@

# The name of an image file (relative to this directory) to place at the top of
# the title page.
latex_logo = "_static/logo.pdf"
latex_logo = "_static/images/logo-light-mode.png"

# For "manual" documents, if this is true, then toplevel headings are parts,
# not chapters.
Expand Down
9 changes: 4 additions & 5 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@
ASDF Standard
=============

This document describes the Advanced Scientific Data Format (ASDF),
pronounced *AZ*-diff.
This document describes the Advanced Scientific Data Format (ASDF) Standard.

The ASDF python implementation documentation can be found :ref:`here <asdf:asdf>`.
The ASDF Standard prescribes the specification and implementation standards for creating, editing and reading ASDF files.

Documentation for the `asdf` python implementation can be found :ref:`here <asdf:asdf>`.

.. only:: html

Expand All @@ -15,7 +16,6 @@ The ASDF python implementation documentation can be found :ref:`here <asdf:asdf>
.. toctree::
:maxdepth: 1

intro.rst
file_layout.rst
tree.rst
versioning.rst
Expand Down Expand Up @@ -47,4 +47,3 @@ published in *Astronomy and Computing*:
.. only:: html

* :ref:`genindex`
* :ref:`search`
120 changes: 0 additions & 120 deletions docs/source/intro.rst

This file was deleted.

4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ docs = [
'graphviz',
'matplotlib',
'docutils',
'sphinx-rtd-theme > 1.2.0',
'furo',
]
test = [
'pytest',
Expand All @@ -36,7 +36,7 @@ test = [

[project.urls]
'tracker' = 'https://github.com/asdf-format/asdf-standard/issues'
'documentation' = 'https://asdf-standard.readthedocs.io/en/stable'
'documentation' = 'https://www.asdf-format.org/projects/asdf-standard/en/latest'
'repository' = 'https://github.com/asdf-format/asdf-standard'

[project.entry-points]
Expand Down

0 comments on commit d6d713a

Please sign in to comment.