Docs: sync content from original repo

This commit is contained in:
AllenWriter
2025-04-28 16:12:04 +08:00
parent 5dfc184726
commit a7ea54c282
190 changed files with 1812 additions and 1627 deletions

View File

@@ -90,7 +90,7 @@ class DocMigrationHelper:
# 收集可能的路径
potential_paths = []
# 处理文件扩展名 (.mdx -> .md)
# 处理文件扩展名 (.mdx -> )
rest_path = os.path.join(*parts[1:])
if rest_path.endswith(".mdx"):
rest_path = rest_path[:-4] + ".md"
@@ -489,7 +489,7 @@ class DocMigrationHelper:
changes.append((full_match, new_text, 'Frame组件图片'))
# 3. 查找并替换文档引用链接
# [link text](./path/to/file.md) 或 [link text](path/to/file.md)
# [link text](./path/to/file) 或 [link text](path/to/file)
doc_link_pattern = re.compile(r'\[([^\]]+)\]\((\./[^)]+\.md(?:#[^)]*)?|\.\./[^)]+\.md(?:#[^)]*)?|[^)]+\.md(?:#[^)]*)?)\)')
for match in doc_link_pattern.finditer(content):
link_text = match.group(1)

View File

@@ -2,7 +2,7 @@
"""
This script automatically fixes relative path references in Markdown files.
It searches for links to .md and .mdx files and replaces them with the correct format
for Mintlify documentation, changing links like [text](file.md) or [text](file.mdx) to [text](./file).
for Mintlify documentation, changing links like [text](file) or [text](file.mdx) to [text](./file).
使用方法:
1. 在命令行中运行: python fix_markdown_links.py [directory]