use local rather than remote links between different gi-docgen modules
After working around #3357 (moved), if I open DESTDIR/usr/share/doc/gio-2.0/class.Application.html
in a browser or devhelp and click the "Ancestors → GObject" link, I'm taken to the GObject documentation on the GLib/GTK website, which is not necessarily for a version of GObject that matches the one I have locally.
For the other modules that are part of GLib, it would be nice if this was a relative link to the other locally-provided documentation, which could be achieved by having urlmap.js
contain
[ 'GObject', '../gobject-2.0/' ],
and so on. (GTK will still need to be a remote/web link, though.)
The Debian packaging for GLib currently works around this with:
sed -i \
-e 's|https\?://docs\.gtk\.org/gio/|../gio-2.0/|' \
-e 's|https\?://docs\.gtk\.org/gio-unix/|../gio-unix-2.0/|' \
-e 's|https\?://docs\.gtk\.org/glib/|../glib-2.0/|' \
-e 's|https\?://docs\.gtk\.org/glib-unix/|../glib-unix-2.0/|' \
-e 's|https\?://docs\.gtk\.org/gmodule/|../gmodule-2.0/|' \
-e 's|https\?://docs\.gtk\.org/gobject/|../gobject-2.0/|' \
debian/tmp/usr/share/doc/*-2.0/urlmap.js
where debian/tmp
is our $DESTDIR
; or we could discard the upstream urlmap.js
entirely and provide our own, but that seems less future-proof against GLib potentially gaining cross-references to other external libraries besides GTK, like maybe libsoup or libportal.