Fix functions documentation header duplication

This commit is contained in:
jonpas 2023-05-01 17:15:48 +02:00
parent 5e83add1c7
commit 7c2d6ae72b

View File

@ -293,16 +293,17 @@ def document_functions(addons_dir, components):
output = os.path.join(wiki_dir, component) + ".md"
with open(output, "w", encoding="utf-8") as file:
file.writelines([
"---\n",
"layout: wiki\n",
"title: {} Functions\n".format(component_name),
"description: List of functions in {} component.\n".format(component_name),
"group: functions\n",
"parent: wiki\n",
"---\n",
])
for function in components[component]:
file.writelines([
"---\n",
"layout: wiki\n",
"title: {} Functions\n".format(component_name),
"description: List of functions in {} component.\n".format(component_name),
"group: functions\n",
"parent: wiki\n",
"---\n",
])
file.write(function.document(component))
return errors