From 2a63b8ddb8e74d12f91e4246d5c88709fb8a4d59 Mon Sep 17 00:00:00 2001 From: Ash Berlin-Taylor Date: Wed, 9 Dec 2020 14:41:06 +0000 Subject: [PATCH] Update theme to show hidden ToC in sidebar Closes #12554 --- airflow/serialization/serialized_objects.py | 3 +++ docs/apache-airflow/index.rst | 7 +++---- docs/conf.py | 6 ++++-- setup.py | 4 ++-- 4 files changed, 12 insertions(+), 8 deletions(-) diff --git a/airflow/serialization/serialized_objects.py b/airflow/serialization/serialized_objects.py index 1cdcb5c45e05f..403030be67d26 100644 --- a/airflow/serialization/serialized_objects.py +++ b/airflow/serialization/serialized_objects.py @@ -67,6 +67,9 @@ _OPERATOR_EXTRA_LINKS: Set[str] = { "airflow.operators.trigger_dagrun.TriggerDagRunLink", "airflow.sensors.external_task.ExternalTaskSensorLink", + # Deprecated names, so that existing serialized dags load straight away. + "airflow.operators.dagrun_operator.TriggerDagRunLink", + "airflow.sensors.external_task_sensor.ExternalTaskSensorLink", } diff --git a/docs/apache-airflow/index.rst b/docs/apache-airflow/index.rst index 80eac83cb480f..dcc20acee55b2 100644 --- a/docs/apache-airflow/index.rst +++ b/docs/apache-airflow/index.rst @@ -69,10 +69,9 @@ similar from a run to the next, this allows for clarity around unit of work and continuity. -Content -------- .. toctree:: - :maxdepth: 1 + :hidden: + :caption: Content Home project @@ -108,7 +107,7 @@ Content privacy_notice .. toctree:: - :maxdepth: 1 + :hidden: :caption: References Operators and hooks diff --git a/docs/conf.py b/docs/conf.py index 86fc2cfa0eccf..519da258492af 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -245,8 +245,10 @@ def _get_rst_filepath_from_path(filepath: str): html_show_copyright = False # Theme configuration -sphinx_airflow_theme_navbar_links = [{'href': '/index.html', 'text': 'Documentation'}] -sphinx_airflow_theme_hide_website_buttons = True +html_theme_options = { + 'hide_website_buttons': True, +} + # A dictionary of values to pass into the template engine’s context for all pages. html_context = { # Google Analytics ID. diff --git a/setup.py b/setup.py index 070ff29c32441..16b5998c06e4f 100644 --- a/setup.py +++ b/setup.py @@ -154,8 +154,8 @@ def write_version(filename: str = os.path.join(*[my_dir, "airflow", "git_version _SPHINX_AIRFLOW_THEME_URL = ( - "https://github.com/apache/airflow-site/releases/download/v0.0.1/" - "sphinx_airflow_theme-0.0.1-py3-none-any.whl" + "https://github.com/apache/airflow-site/releases/download/v0.0.2/" + "sphinx_airflow_theme-0.0.2-py3-none-any.whl" ) # 'Start dependencies group' and 'Start dependencies group' are mark for ./scripts/ci/check_order_setup.py