Skip to content

Commit 0ef778c

Browse files
committed
Fix lint
1 parent 507e99e commit 0ef778c

File tree

3 files changed

+11
-7
lines changed

3 files changed

+11
-7
lines changed

.github/workflows/doc-build.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,11 @@ jobs:
7575
cp -rf executorch_android/build/intermediates/java_doc_dir/release/javaDocReleaseGeneration "${RUNNER_DOCS_DIR}/javadoc"
7676
cd ../..
7777
78-
# Note: noindex meta tag is automatically added by conf.py for non-stable releases (main, dev versions)
78+
# If it's main branch, add noindex tag to all .html files to exclude from Google Search indexing.
79+
echo "GitHub Ref: ${GITHUB_REF}"
80+
if [[ "${{ github.ref }}" == 'refs/heads/main' ]]; then
81+
find docs/_build/html/ -name "*.html" -print0 | xargs -0 sed -i '/<head>/a \ \ <meta name="robots" content="noindex">';
82+
fi
7983
8084
cp -rf docs/_build/html/* "${RUNNER_DOCS_DIR}"
8185

.mypy.ini

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,12 @@ ignore_missing_imports = True
7474
[mypy-pytorch_sphinx_theme]
7575
ignore_missing_imports = True
7676

77+
[mypy-pytorch_sphinx_theme2]
78+
ignore_missing_imports = True
79+
80+
[mypy-executorch.version]
81+
ignore_missing_imports = True
82+
7783
[mypy-ruamel]
7884
ignore_missing_imports = True
7985

docs/source/conf.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -255,12 +255,6 @@
255255
"display_version": True,
256256
}
257257

258-
# Control the noindex meta tag based on version
259-
# Only add noindex for main branch (not stable releases)
260-
if not RELEASE:
261-
html_meta = {
262-
"robots": "noindex",
263-
}
264258

265259
# Add any paths that contain custom static files (such as style sheets) here,
266260
# relative to this directory. They are copied after the builtin static files,

0 commit comments

Comments
 (0)