Added Sphinx extension to aid referencing GObject docs
This MR adds a new Sphinx extension gobject_docs
. It allows inline reference generation for external
GObject API documentation (generated by gi-docgen
). This extension (and the config provided) provides similar utility as intersphinx
does with roles such as
:py:class:`zipfile.Zipfile`
If this MR is merged, references can be made via special roles within .rst
files. For example, to add a reference to the Box
class of GTK 4, and a reference to libadwaita
's Swipeable
interface with an explicit title, you can write
Here's some GTK4 docs: :gtk4:class:`Box`.
And if you're interested in ``libadwaita``,
:adw:iface:`take a look at this documentation <Swipeable>`
Here's some GTK4 docs: Box. And if you're interested in
libadwaita
, take a look at this documentation
I thought this might be useful as a way of avoiding hardcoding these URLs after spending some time looking at porting over other tutorials (#8). Happy to update references throughout in a separate MR if you end up merging this :)