Úr Balázs
urbalazs at gmail dot com
2018.
Installing API documentation
How Devhelp finds the API documentation.
Books locations
Once a book follows the right format, its directory needs to be installed
at a location where Devhelp will find it.
Devhelp uses the
XDG Base Directory Specification
to find the books. The list of locations searched is:
$XDG_DATA_HOME/devhelp/books/
$XDG_DATA_HOME/gtk-doc/html/
$XDG_DATA_DIRS/devhelp/books/
$XDG_DATA_DIRS/gtk-doc/html/
Note that the two latter consist of :-separated lists of directories to
look for. Those environment variables are normally set up by the desktop
environment or distribution.
Examples of locations to index files with $XDG_DATA_HOME on a
typical system:
~/.local/share/devhelp/books/glib/glib.devhelp2
~/.var/app/org.gnome.Devhelp/data/devhelp/books/glib/glib.devhelp2
if Devhelp is launched with
Flatpak.
Example of a location to an index file with $XDG_DATA_DIRS on
a typical system:
/usr/share/gtk-doc/html/glib/glib.devhelp2
GTK-Doc
GTK-Doc is a tool to
generate API documentation from comments added to C code. It is used by
GLib, GTK and GNOME libraries and applications.
GTK-Doc installs the API reference of a module into:
$datadir/gtk-doc/html/$module_name/
It follows the book format supported by Devhelp. So by using
GTK-Doc, the API reference can be browsed in Devhelp
automatically (once installed in the right location, that is).