INNER CODE UNIT · Python

target

WenyuChiou/awesome-agentic-ai-zh · scripts/build-docs-tree.py:133

        target = DEST / rel
        target.parent.mkdir(parents=True, exist_ok=True)
        shutil.copy2(src, target)
        copied_files += 1

    # The repo's GitHub README must NOT be staged as `README.md`: mkdocs
    # special-cases that filename as a directory index, which collides with
    # `index.md` (the landing) and resolves inconsistently per i18n locale.
    # Stage it as `about.md`; mkdocs_hooks.py rewrites in-content
    # `README.md` links to `about.md` so they still resolve on the site.
    for stem in ROOT_STEMS:
        out_stem = {"README": "about"}.get(stem, stem)
        for suffix in (".md", ".en.md", ".zh-Hans.md"):
            f = REPO / f"{stem}{suffix}"
            if f.is_file():
                shutil.copy2(f, DEST / f"{out_stem}{suffix}")
                copied_files += 1

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…