👷 Add pre-commit config with local script for permalinks (#14398)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This commit is contained in:
Sebastián Ramírezandgithub-actions[bot] authored and GitHub committed 2025-11-23 18:41:43 +01:00
1 parent 79bc4b9ca0
commit 4f3ff79736
5 files changed
+37 -13

No files matched your search

+9
View File
@@ -520,6 +520,15 @@ def add_permalinks_page(path: Path, update_existing: bool = False):
f.writelines(updated_lines)
@app.command()
def add_permalinks_pages(pages: List[Path], update_existing: bool = False) -> None:
"""
Add or update header permalinks in specific pages of En docs.
"""
for md_file in pages:
add_permalinks_page(md_file, update_existing=update_existing)
@app.command()
def add_permalinks(update_existing: bool = False) -> None:
"""