gi-docgen documentation has broken references to ../urlmap.js
(This might be a GNOME/gi-docgen> issue, but initially reporting it in GLib in case GLib is holding it wrong.)
To reproduce:
$ git submodule update --init
$ mkdir _build
$ podman run -it --rm -v $(pwd):$(pwd):ro -w $(pwd) -v $(pwd)/_build:$(pwd)/_build:rw debian:sid-slim
# sed -i -e 's/Types: deb$/& deb-src/' /etc/apt/sources.list.d/debian.sources
# apt update
# apt dist-upgrade
# apt build-dep glib2.0
# meson setup -Dsysconfdir=/etc -Dlocalstatedir=/var -Dprefix=/usr -Ddocumentation=true _build
# meson compile -C _build
# DESTDIR=$(pwd)/DESTDIR meson install -C _build
# exit
$ gio open _build/DESTDIR/usr/share/doc/gio-2.0/class.Application.html
(This ends up using gi-docgen 2023.3.)
Expected result: "Ancestors → GObject" link is clickable, and takes me to GObject's class.Object.html
, either on the GLib/GTK website or locally.
Actual result: HTML contains <script src="../urlmap.js"></script>
which tries to load _build/DESTDIR/usr/share/doc/urlmap.js
, which was not installed. As a result, cross-references between projects do not work. The correct script reference would be <script src="urlmap.js"></script>
.
I think gi-docgen might be mixing up the relative path from gio.toml.in
to urlmap.js
in the source directory, which is correctly ../urlmap.js
, with the relative path from each generated HTML file to the installed urlmap.js
in the installation directory, which should be urlmap.js
or equivalently ./urlmap.js
.
/cc @ebassi