disnake icon indicating copy to clipboard operation
disnake copied to clipboard

refactor: improve sphinx extensions

Open shiftinv opened this issue 3 years ago • 0 comments
trafficstars

Summary

Adds annotations to all custom sphinx extensions, and reworks the custom html builder defined in docs/extensions/builder.py, replacing outdated or otherwise unnecessarily complex code. The resulting html is exactly the same as before (both locally and on rtd), except for two things:

  • The old dropdown svg isn't used anymore and was removed, the disnake.svg icon now lives in _static instead of _images
  • The CustomHTML5TranslatorMixin (which allows horizontally scrolling tables) now applies to the htmlzip build as well

Checklist

  • [x] If code changes were made, then they have been tested
    • [ ] I have updated the documentation to reflect the changes
    • [x] I have formatted the code properly by running task lint
    • [x] I have type-checked the code by running task pyright
  • [x] This PR fixes an issue
  • [ ] This PR adds something new (e.g. new method or parameters)
  • [ ] This PR is a breaking change (e.g. methods or parameters removed/renamed)
  • [ ] This PR is not a code change (e.g. documentation, README, ...)

shiftinv avatar Aug 05 '22 22:08 shiftinv