DisnakeDev / disnake

An API wrapper for Discord written in Python.
https://docs.disnake.dev
MIT License
715 stars 136 forks source link

docs: update build for new readthedocs addons #1207

Closed shiftinv closed 1 week ago

shiftinv commented 1 month ago

Summary

See https://about.readthedocs.com/blog/2024/07/addons-by-default/.

There are technically two separate things going on, although the blog post really only highlights the first one: tl;dr: many words, few changes.


1. readthedocs addons

(Re-)Implements the bottom-right flyout menu, plus a couple other things. See the repo and blog post.

There aren't many changes for us here in practice; compared to the build-time extension, mainly a couple minor visual updates of the flyout menu and version warning banners. This now also leaves sphinx' search feature alone and doesn't patch it to use RTD's API, so manually setting docsearch_disabled on our end isn't required anymore.

Timeline

Can be enabled/disabled via a toggle in the dashboard, will be enabled for everyone in October.


2. conf.py changes

Previously, RTD would append a bunch of stuff to docs/conf.py at build time, which was rather annoying sometimes.

Not many changes here either; we already set html_baseurl, and the only context value used in templates was READTHEDOCS, which I've added again.

Timeline

Not entirely clear atp. This can't be toggled via the dashboard, and will just happen at some point. From a couple comments I've read, this is slated to be applied to new projects in ~two weeks, and will be enabled for everyone in October as well, but is still technically independent of the addons rollout.

update: diff of old/new context here


Issues

  1. readthedocs addons
  2. conf.py changes

Checklist

[^1]: except those using a custom build.commands config