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

Swap mkdocs theme for Material #43

Merged
merged 6 commits into from
Apr 2, 2025
Merged

Conversation

robbieaverill
Copy link

@robbieaverill robbieaverill commented Apr 1, 2025

Changes:

  • Add a cross environment compatible shebang to docs build script
  • Swap mkdocs theme to Material

The sidebar for the Python docs contains many items. It does not scroll properly, as noted in mkdocs/mkdocs#2780.

Swapping to use the Material theme is an easy change and looks better, in my opinion. The Material theme does not have the same scrolling issue.

image

In the Python docs, we use the "summary" view for attributes, which includes auto linking to more info for the types. This works for local types, e.g. Oreint3 or ImageArray, as well as native Python types.

image

Unfortunately, Rust methods annotations on the class's attributes are not being picked up by the parser, so we don't have descriptions on class attributes yet. With the summary view in place, you can now click on the type of the attribute to get more information, including a description.

The sidebar for the Python docs contains many items. It does not scroll
properly, as noted in mkdocs/mkdocs#2780.

Swapping to use the Material theme is an easy change and looks better,
in my opinion. The Material theme does not have the same scrolling
issue.
…e info

As part of this we overload a couple of templates in order to customise
them. We remove a trailing colon (sounds like localisation is not fully
implemented, so changing a dictionary is not an option), and remove
the default place where attributes are listed as we now display them
in the summary.
@Tim-Evans-Seequent Tim-Evans-Seequent merged commit d7bbe4d into main Apr 2, 2025
10 checks passed
@Tim-Evans-Seequent Tim-Evans-Seequent deleted the python-docs-review branch April 2, 2025 20:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants