Use macros for Docs tables de-duplication (#14990)

Co-authored-by: UltralyticsAssistant <web@ultralytics.com>
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
This commit is contained in:
Francesco Mattioli 2024-08-09 14:21:17 +02:00 committed by GitHub
parent e5a5be5d20
commit 5880e18fa7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
20 changed files with 54 additions and 184 deletions

View file

@ -123,7 +123,7 @@ def update_markdown_files(md_filepath: Path):
content = content.replace("", "'").replace("", "'")
# Add frontmatter if missing
if not content.strip().startswith("---\n"):
if not content.strip().startswith("---\n") and "macros" not in md_filepath.parts: # skip macros directory
header = "---\ncomments: true\ndescription: TODO ADD DESCRIPTION\nkeywords: TODO ADD KEYWORDS\n---\n\n"
content = header + content