docs: cleanup and extra references
This commit is contained in:
parent
511c3ebd95
commit
f569f4c008
5 changed files with 14 additions and 3 deletions
6
.github/scripts/prepare_docs.py
vendored
6
.github/scripts/prepare_docs.py
vendored
|
|
@ -3,7 +3,7 @@ import glob
|
|||
import re
|
||||
import shutil
|
||||
|
||||
folders_to_copy = ["src", "scripts"]
|
||||
folders_to_copy = ["src", "scripts", "configs" ]
|
||||
for folder in folders_to_copy:
|
||||
if os.path.exists(folder):
|
||||
shutil.copytree(folder, f"docs/{folder}", dirs_exist_ok=True)
|
||||
|
|
@ -12,9 +12,9 @@ for filepath in glob.glob("docs/**/*.md", recursive=True):
|
|||
with open(filepath, "r", encoding="utf-8") as f:
|
||||
content = f.read()
|
||||
|
||||
# RULE A: Fix links pointing OUT to src/ or scripts/
|
||||
# RULE A: Fix links pointing OUT to src/, scripts/, or configs/
|
||||
# Logic: Because the folders were moved one level deeper, we remove exactly ONE '../'
|
||||
content = re.sub(r"\]\(\.\./((?:\.\./)*)(src|scripts)/([^)]*)\)", r"](\1\2/\3)", content)
|
||||
content = re.sub(r"\]\(\.\./((?:\.\./)*)(src|scripts|configs)/([^)]*)\)", r"](\1\2/\3)", content)
|
||||
|
||||
# RULE B: Fix links pointing FROM the copied files back TO the original docs/ folder
|
||||
# Logic: Since these files are now inside docs/, the 'docs/' segment in the path is redundant.
|
||||
|
|
|
|||
Reference in a new issue