doc: print tilte of Kconfig on top

Add the symbol name on top and in the page title. This will enhance
search results and adds a missing page header that is needed.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This commit is contained in:
Anas Nashif 2021-07-01 14:23:58 -04:00 committed by Christopher Friedt
commit 863c1708d3

View file

@ -528,9 +528,12 @@ def sym_header_rst(sym):
#
# - '.. title::' sets the title of the document (e.g. <title>). This seems
# to be poorly documented at the moment.
l = len(f"CONFIG_{sym.name}")
return ":orphan:\n\n" \
f".. title:: {sym.name}\n\n" \
f".. title:: CONFIG_{sym.name}\n\n" \
f".. kconfig:: CONFIG_{sym.name}\n\n" \
f"CONFIG_{sym.name}\n" \
f"{'#' * l}\n\n" \
f"{prompt_rst(sym)}\n\n" \
f"Type: ``{kconfiglib.TYPE_TO_STR[sym.type]}``\n\n"