aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXavier Claessens <xavier.claessens@collabora.com>2023-03-28 10:53:55 -0400
committerEli Schwartz <eschwartz93@gmail.com>2023-03-28 14:56:47 -0400
commit728c8dce245a4df095e5acab42db769d79efd1ba (patch)
treedd3db42aa5b1a220168df43caf535ba9ccc40a6c
parent748a1db1f8ea173b6f5841ce17876452424333d4 (diff)
downloadmeson-728c8dce245a4df095e5acab42db769d79efd1ba.zip
meson-728c8dce245a4df095e5acab42db769d79efd1ba.tar.gz
meson-728c8dce245a4df095e5acab42db769d79efd1ba.tar.bz2
doc: Use better name for builtin/return object title
The title is used only in the sidebar. There is no need to have "extends" information there. For returned objects the actual name is not meaningful so it's better to use the long name. For builtin objects the name is important because that's the global variable name.
-rw-r--r--docs/refman/generatormd.py1
-rw-r--r--docs/refman/templates/object.mustache2
2 files changed, 2 insertions, 1 deletions
diff --git a/docs/refman/generatormd.py b/docs/refman/generatormd.py
index 9723034..6029016 100644
--- a/docs/refman/generatormd.py
+++ b/docs/refman/generatormd.py
@@ -281,6 +281,7 @@ class GeneratorMD(GeneratorBase):
def _write_object(self, obj: Object) -> None:
data = {
'name': obj.name,
+ 'title': obj.long_name if obj.obj_type == ObjectType.RETURNED else obj.name,
'description': obj.description,
'notes': obj.notes,
'warnings': obj.warnings,
diff --git a/docs/refman/templates/object.mustache b/docs/refman/templates/object.mustache
index ec86034..3b6c679 100644
--- a/docs/refman/templates/object.mustache
+++ b/docs/refman/templates/object.mustache
@@ -1,6 +1,6 @@
---
short-description: "{{obj_type_name}} object: {{long_name}}"
-title: {{name}}{{#extends}} (extends {{.}}){{/extends}}
+title: {{title}}
render-subpages: false
...
# {{long_name}} (`{{name}}`{{#extends}} extends [[@{{.}}]]{{/extends}})