[docs] add deprecation notice banner to legacy documentation site (#23516)

This commit is contained in:
zijiexia
2026-04-22 20:17:53 -07:00
committed by GitHub
parent 214c35b031
commit 6490afe36e
4 changed files with 84 additions and 1 deletions
+10 -1
View File
@@ -13,6 +13,12 @@ The documentation has been migrated. Please make documentation updates in the
corresponding location under docs_new/ instead.
"""
LEGACY_DOCS_ALLOWLIST = {
"docs/_static/css/custom_log.css",
"docs/_static/js/deprecation_banner.js",
"docs/conf.py",
}
def staged_paths() -> list[str]:
result = subprocess.run(
@@ -33,7 +39,10 @@ def staged_paths() -> list[str]:
def main() -> int:
paths = sys.argv[1:] or staged_paths()
docs_paths = sorted(
path for path in paths if path == "docs" or path.startswith("docs/")
path
for path in paths
if (path == "docs" or path.startswith("docs/"))
and path not in LEGACY_DOCS_ALLOWLIST
)
if not docs_paths: