docs: edit links, direct for notebooks (#22051)

This commit is contained in:
Erick Friis
2024-05-24 12:44:46 -07:00
committed by GitHub
parent 42ffcb2ff1
commit 8acadc34f5
6 changed files with 36 additions and 5 deletions

View File

@@ -13,8 +13,13 @@ def update_links(doc_path, docs_link):
# replace relative links
content = re.sub(r"\]\(\.\/", f"]({docs_link}", content)
frontmatter = """---
custom_edit_url:
---
"""
with open(DOCS_DIR / doc_path, "w") as f:
f.write(content)
f.write(frontmatter + content)
if __name__ == "__main__":