summaryrefslogtreecommitdiff
path: root/giscanner/doctemplates/devdocs/Gjs/_doc.tmpl
diff options
context:
space:
mode:
authorPhilip Chimento <philip.chimento@gmail.com>2015-12-06 18:03:15 -0800
committerrockon999 <rockon999@users.noreply.github.com>2018-08-06 02:53:45 -0500
commit89d655237f9c08a9a83565b2efafe212df41f508 (patch)
tree148a9e02e1fe7c0ea094c7ffa5cb3a01ec272648 /giscanner/doctemplates/devdocs/Gjs/_doc.tmpl
parent2635fb9fa3e223ae299a4306acf9dc85c6745637 (diff)
downloadgobject-introspection-89d655237f9c08a9a83565b2efafe212df41f508.tar.gz
devdocs: Generate versioning notes
For GIR nodes with version annotations, such as "Since:", "Deprecated:", and "Stability:", we generate stability notes at the top of each node's documentation. These notes are given the CSS class "versioning-note" so that we can format them nicely in DevDocs.
Diffstat (limited to 'giscanner/doctemplates/devdocs/Gjs/_doc.tmpl')
-rw-r--r--giscanner/doctemplates/devdocs/Gjs/_doc.tmpl25
1 files changed, 25 insertions, 0 deletions
diff --git a/giscanner/doctemplates/devdocs/Gjs/_doc.tmpl b/giscanner/doctemplates/devdocs/Gjs/_doc.tmpl
new file mode 100644
index 00000000..0e132b44
--- /dev/null
+++ b/giscanner/doctemplates/devdocs/Gjs/_doc.tmpl
@@ -0,0 +1,25 @@
+<%def name="format_documentation(node)">
+ % if node.version:
+ <p class="versioning-note">
+ New in version ${node.version}.
+ ${formatter.format_inline(node, node.version_doc)}
+ </p>
+ % endif
+ % if node.deprecated:
+ <p class="versioning-note">
+ Deprecated since ${node.deprecated}.
+ ${formatter.format_inline(node, node.deprecated_doc)}
+ </p>
+ % endif
+ % if node.stability:
+ ## Not sure what this looks like in the wild
+ <p class="versioning-note">
+ Stability: ${node.stability}.
+ ${formatter.format_inline(node, node.stability_doc)}
+ </p>
+ % endif
+
+ % if node.doc:
+ ${formatter.format(node, node.doc)}
+ % endif
+</%def>