Optimized docs

This commit is contained in:
2025-03-20 15:08:18 +01:00
parent 4c29fc9f02
commit 096934e795
11 changed files with 28 additions and 22 deletions

View File

@@ -36,7 +36,9 @@ def generate_yaml_index(source_dir, output_file):
f.write("This document lists all `.yaml` and `.yml` files found in the specified directory, excluding ignored files.\n\n")
for file in sorted(yaml_files):
f.write(f".. literalinclude:: {file}\n :language: yaml\n :linenos:\n\n")
relative_file_path = os.path.relpath(file, start=os.path.dirname(output_file))
f.write(f".. literalinclude:: {relative_file_path}\n :language: yaml\n :linenos:\n\n")
print(f"YAML index has been generated at {output_file}")