Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions airflow-core/docs/redirects.txt
Original file line number Diff line number Diff line change
Expand Up @@ -184,5 +184,5 @@ howto/operator/python.rst ../../apache-airflow-providers-standard/stable/operato
howto/operator/time.rst ../../apache-airflow-providers-standard/stable/sensors/datetime.rst
howto/operator/weekday.rst ../../apache-airflow-providers-standard/stable/operators/datetime.rst#branchdayofweekoperator

_api/airflow/operators/datetime/index.html ../apache-airflow-providers-standard/stable/_api/airflow/providers/standard/operators/datetime/index.html
_api/airflow/operators/empty/index.html ../apache-airflow-providers-standard/stable/_api/airflow/providers/standard/operators/empty/index.html
_api/airflow/operators/datetime/index.html ../../apache-airflow-providers-standard/stable/_api/airflow/providers/standard/operators/datetime/index.html
_api/airflow/operators/empty/index.html ../../apache-airflow-providers-standard/stable/_api/airflow/providers/standard/operators/empty/index.html
8 changes: 7 additions & 1 deletion devel-common/src/sphinx_exts/redirects.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,13 @@ def generate_redirects(app):
to_path_prefix = f"..{os.path.sep}" * (len(from_path.split(os.path.sep)) - 1)
# The redirect path needs to move back to the root of the apache-airflow docs directory
# or the root of the docs directory altogether for provider distributions.
if "../" and "providers" in to_path:
if (
from_path.startswith("_api/airflow/")
and "_api/airflow/providers" not in from_path
and "providers" in to_path
):
to_path_prefix = f"..{os.path.sep}" * (len(from_path.split(os.path.sep)) - 1)
elif "../" and "providers" in to_path:
to_path_prefix = f"..{os.path.sep}" * (len(from_path.split(os.path.sep)))
else:
to_path_prefix = f"..{os.path.sep}" * (len(from_path.split(os.path.sep)) - 1)
Expand Down
Loading