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.
pull/11623/head
Xavier Claessens 2 years ago committed by Eli Schwartz
parent 748a1db1f8
commit 728c8dce24
  1. 1
      docs/refman/generatormd.py
  2. 2
      docs/refman/templates/object.mustache

@ -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,

@ -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}})

Loading…
Cancel
Save