docs: Add initial support for using gi-docgen for docs

The files here are copied from the docs-gtk-org
branch of gtk.

This adds gi-docgen to the CI Dockerfiles and ensures the new versions
(including the OS upgrades from the previous commit) are used during CI.

Helps: #3037
This commit is contained in:
Matthias Clasen
2023-10-09 23:04:21 +01:00
committed by Philip Withnall
parent 9dd59ba8ad
commit 39e9ef54be
21 changed files with 251881 additions and 6 deletions

136814
docs/reference/gio/Gio-2.0.gir Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,47 @@
# SPDX-License-Identifier: LGPL-2.1-or-later
# Copyright 2023 Matthias Clasen
# Copyright 2023 Philip Withnall
[library]
name = "Gio"
version = "@VERSION@"
browse_url = "https://gitlab.gnome.org/GNOME/glib/"
repository_url = "https://gitlab.gnome.org/GNOME/glib.git"
website_url = "https://www.gtk.org"
docs_urls = "https://docs.gtk.org/gio/"
authors = "GLib Development Team"
license = "LGPL-2.1-or-later"
description = "Gio is a library providing useful classes for general purpose I/O, networking, IPC, settings, and other high level application functionality"
dependencies = [ "GLib-2.0", "GModule-2.0", "GObject-2.0" ]
devhelp = true
search_index = true
[dependencies."GLib-2.0"]
name = "GLib"
description = "The base utility library"
docs_url = "https://docs.gtk.org/glib/"
[dependencies."GModule-2.0"]
name = "GModule"
description = "Portable API for dynamically loading modules"
docs_url = "https://docs.gtk.org/gmodule/"
[dependencies."GObject-2.0"]
name = "GObject"
description = "The base type system library"
docs_url = "https://docs.gtk.org/gobject/"
[theme]
name = "basic"
show_index_summary = true
show_class_hierarchy = true
[extra]
urlmap_file = "urlmap.js"
# The same order will be used when generating the index
content_files = [
]
content_images = [
"menu-example.png",
"menu-model.png",
]

View File

@@ -234,3 +234,28 @@ if get_option('man')
install_dir: man1_dir)
endforeach
endif
# gi-docgen version
expand_content_files = [
]
gio_gir = meson.current_source_dir() / 'Gio-2.0.gir'
gio_toml = configure_file(input: 'gio.toml.in', output: 'gio.toml', configuration: toml_conf)
custom_target('gio-docs',
input: [ gio_toml, gio_gir ],
output: 'gio',
command: [
gidocgen,
'generate',
gidocgen_common_args,
'--config=@INPUT0@',
'--output-dir=@OUTPUT@',
'--content-dir=@0@'.format(meson.current_source_dir()),
'--add-include-path=@0@'.format(meson.current_source_dir() / '../glib'),
'--add-include-path=@0@'.format(meson.current_source_dir() / '../gobject'),
'@INPUT1@',
],
build_by_default: true,
depend_files: expand_content_files,
)

View File

@@ -0,0 +1,9 @@
// SPDX-License-Identifier: LGPL-2.1-or-later
// SPDX-FileCopyrightText: 2023 Matthias Clasen
var baseURLs = [
[ 'GLib', 'https://docs.gtk.org/glib/' ],
[ 'GModule', 'https://docs.gtk.org/gmodule/' ],
[ 'GObject', 'https://docs.gtk.org/gobject/' ],
[ 'Gio', 'https://docs.gtk.org/gio/' ],
[ 'Gtk', 'https://docs.gtk.org/gtk4/' ],
];