[gi-docgen/ebassi/related-libraries: 2/3] template: Split dependencies from related libraries
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gi-docgen/ebassi/related-libraries: 2/3] template: Split dependencies from related libraries
- Date: Sat, 12 Feb 2022 16:43:00 +0000 (UTC)
commit 0c11262f9fc45f3bd00cd42b734042525c8dd2d1
Author: Emmanuele Bassi <ebassi gnome org>
Date: Sat Feb 12 16:38:01 2022 +0000
template: Split dependencies from related libraries
Dependencies must be included in the introspection data.
Related libraries are part of the project configuration.
gidocgen/templates/basic/namespace.html | 38 ++++++++++++++++++++++++++++-----
1 file changed, 33 insertions(+), 5 deletions(-)
---
diff --git a/gidocgen/templates/basic/namespace.html b/gidocgen/templates/basic/namespace.html
index 518151a..d039f8b 100644
--- a/gidocgen/templates/basic/namespace.html
+++ b/gidocgen/templates/basic/namespace.html
@@ -83,7 +83,7 @@ SPDX-License-Identifier: Apache-2.0 OR GPL-3.0-or-later
</div>
</header>
- {% if CONFIG.dependencies|length > 0 %}
+ {% if repository.includes %}
<section>
<div class="toggle-wrapper">
<h4 id="dependencies" style="display:flex;">
@@ -93,14 +93,42 @@ SPDX-License-Identifier: Apache-2.0 OR GPL-3.0-or-later
<div class="docblock">
<table>
- {% for gir_name, dep in CONFIG.dependencies.items() %}
+ {% for ns_name, repo in repository.includes.items() %}
+ {% for _, lib in CONFIG.dependencies.items() if lib.name == repo.namespace.name %}
<tr>
- <td><strong>{{ dep.name }}</strong></td>
- <td>{{ dep.description }}</td>
+ <td><strong>{{ repo.namespace.name }}</strong>—{{ repo.namespace.version }}</td>
+ <td>{{ lib.description }}</td>
</tr>
<tr>
<td></td>
- <td><a href="{{ dep.docs_url }}" class="external">Browse documentation</a></td>
+ <td><a href="{{ lib.docs_url }}" class="external">Browse documentation</a></td>
+ </tr>
+ {% endfor %}
+ {% endfor %}
+ </table>
+ </div>
+ </div>
+ </section>
+ {% endif %}
+
+ {% if CONFIG.related|length > 0 %}
+ <section>
+ <div class="toggle-wrapper">
+ <h4 id="related" style="display:flex;">
+ Related libraries
+ <a href="#related" class="anchor"></a>
+ </h4>
+
+ <div class="docblock">
+ <table>
+ {% for gir_name, lib in CONFIG.related.items() %}
+ <tr>
+ <td><strong>{{ lib.name }}</strong></td>
+ <td>{{ lib.description }}</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td><a href="{{ lib.docs_url }}" class="external">Browse documentation</a></td>
</tr>
{% endfor %}
</table>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]