From 863c1708d3769701de14ad61e6edec312ee1ad5d Mon Sep 17 00:00:00 2001 From: Anas Nashif Date: Thu, 1 Jul 2021 14:23:58 -0400 Subject: [PATCH] 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 --- doc/_scripts/gen_kconfig_rest.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/doc/_scripts/gen_kconfig_rest.py b/doc/_scripts/gen_kconfig_rest.py index e5a8bb55960..5a55dd4ae4c 100755 --- a/doc/_scripts/gen_kconfig_rest.py +++ b/doc/_scripts/gen_kconfig_rest.py @@ -528,9 +528,12 @@ def sym_header_rst(sym): # # - '.. title::' sets the title of the document (e.g. ). 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"