diff --git a/docs-archive/apache-airflow-providers-google/0.0.1/index.html b/docs-archive/apache-airflow-providers-google/0.0.1/index.html
new file mode 100644
index 00000000000..c4c4a4d9593
--- /dev/null
+++ b/docs-archive/apache-airflow-providers-google/0.0.1/index.html
@@ -0,0 +1 @@
+Placeholder for apache-airflow-providers-google v0.0.1
diff --git a/docs-archive/apache-airflow-providers-google/0.0.2/index.html b/docs-archive/apache-airflow-providers-google/0.0.2/index.html
new file mode 100644
index 00000000000..efa917fb134
--- /dev/null
+++ b/docs-archive/apache-airflow-providers-google/0.0.2/index.html
@@ -0,0 +1 @@
+Placeholder for apache-airflow-providers-google v0.0.2
diff --git a/docs-archive/apache-airflow-providers-google/stable.txt b/docs-archive/apache-airflow-providers-google/stable.txt
new file mode 100644
index 00000000000..4e379d2bfea
--- /dev/null
+++ b/docs-archive/apache-airflow-providers-google/stable.txt
@@ -0,0 +1 @@
+0.0.2
diff --git a/docs-archive/apache-airflow-providers/index.html b/docs-archive/apache-airflow-providers/index.html
new file mode 100644
index 00000000000..7c84423ba18
--- /dev/null
+++ b/docs-archive/apache-airflow-providers/index.html
@@ -0,0 +1 @@
+Placeholder for apache-airflow-providers
diff --git a/dump-docs-packages-metadata.py b/dump-docs-packages-metadata.py
index 638b4e2239d..62ae9f38021 100644
--- a/dump-docs-packages-metadata.py
+++ b/dump-docs-packages-metadata.py
@@ -30,7 +30,10 @@ def dump_docs_package_metadata():
"all-versions": get_all_versions(os.path.join(APACHE_AIRFLOW_ARCHIVE, package_name)),
}
for package_name in os.listdir(APACHE_AIRFLOW_ARCHIVE)
- if not package_name.startswith(".") # Exclude .DS_Store/
+ if (
+ not package_name.startswith(".") and # Exclude .DS_Store/
+ os.path.isfile(os.path.join(os.path.join(APACHE_AIRFLOW_ARCHIVE, package_name, 'stable.txt')))
+ )
]
json.dump(all_packages_infos, sys.stdout, indent=2)
diff --git a/landing-pages/site/content/en/docs/_index.html b/landing-pages/site/content/en/docs/_index.html
deleted file mode 100644
index 6ab5aa21e92..00000000000
--- a/landing-pages/site/content/en/docs/_index.html
+++ /dev/null
@@ -1,12 +0,0 @@
----
-title: "Documentation"
-linkTitle: "Documentation"
-weight: 20
-menu:
- main:
- weight: 10
----
-
-{{% pageinfo %}}
-This is a placeholder page that add new item to navbar
-{{% /pageinfo %}}
diff --git a/landing-pages/site/content/en/docs/_index.md b/landing-pages/site/content/en/docs/_index.md
new file mode 100644
index 00000000000..55466457397
--- /dev/null
+++ b/landing-pages/site/content/en/docs/_index.md
@@ -0,0 +1,155 @@
+---
+title: "Documentation"
+linkTitle: "Documentation"
+weight: 20
+menu:
+ main:
+ weight: 10
+---
+
+# Documentation
+
+## [Apache Airflow](/docs/apache-airflow/stable/index.html)
+
+Apache Airflow Core, which includes webserver, scheduler, CLI and other components that are needed for minimal Airflow installation.
+
+## [Providers packages](/docs/apache-airflow-providers/index.html)
+
+Providers packages include integrations with third party integrations. They are updated independently of the Apache Airflow core.
+
+
+
+
diff --git a/landing-pages/site/layouts/docs/baseof.html b/landing-pages/site/layouts/docs/baseof.html
new file mode 100644
index 00000000000..caaecb748af
--- /dev/null
+++ b/landing-pages/site/layouts/docs/baseof.html
@@ -0,0 +1,44 @@
+{{/*
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+*/}}
+
+
+
+
+ {{ partial "head.html" . }}
+
+
+
+ {{ partial "navbar.html" . }}
+
+
+
+
+ {{ block "main" . }}{{ end }}
+
+
+ {{ partial "suggest-change" . }}
+
+{{ partialCached "footer.html" . }}
+{{ partialCached "scripts.html" . }}
+
+{{ $script := .Site.Data.webpack.main }}
+{{ with $script.js }}
+
+{{ end }}
+
diff --git a/landing-pages/site/layouts/docs/list.html b/landing-pages/site/layouts/docs/list.html
new file mode 100644
index 00000000000..c4d7742dc58
--- /dev/null
+++ b/landing-pages/site/layouts/docs/list.html
@@ -0,0 +1,24 @@
+{{/*
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+*/}}
+
+{{ define "main" }}
+
+ {{ .Content }}
+
+{{ end }}
diff --git a/landing-pages/site/layouts/docs/single.html b/landing-pages/site/layouts/docs/single.html
new file mode 100644
index 00000000000..02eaa19245a
--- /dev/null
+++ b/landing-pages/site/layouts/docs/single.html
@@ -0,0 +1,24 @@
+ {{/*
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+*/}}
+
+{{ define "main" }}
+
+ {{ .Content }}
+
+{{ end }}
diff --git a/site.sh b/site.sh
index 071c3e073e0..ca5ae31db02 100755
--- a/site.sh
+++ b/site.sh
@@ -263,23 +263,29 @@ function build_site {
mkdir -p dist
rm -rf dist/*
verbose_copy landing-pages/dist/. dist/
- rm -rf dist/docs/* || true
- mkdir -p dist/docs/apache-airflow/
for pkg_path in docs-archive/*/ ; do
+ # Process directories only,
+ if [ ! -d "${pkg_path}" ]; then
+ continue;
+ fi
+
package_name="$(basename -- "${pkg_path}")"
- for ver_path in "docs-archive/${package_name}"/*/ ; do
- version="$(basename -- "${ver_path}")"
- verbose_copy "docs-archive/${package_name}/${version}/." "dist/docs/${package_name}/${version}"
- done
- stable_version="$(cat "docs-archive/${package_name}/stable.txt")"
- verbose_copy "docs-archive/${package_name}/${stable_version}/." "dist/docs/${package_name}/stable"
- create_redirect "dist/docs/${package_name}/index.html" "/docs/${package_name}/stable/index.html"
- done
- # TODO(mik-laj): For Airflow 1.10, we have one package so we don't need a separate index.
- # For Airflow 2.0, we need a separate index, because we also have a provider packages.
- create_redirect "dist/docs/index.html" "/docs/apache-airflow/stable/index.html"
- # This file may already have been created when building landing pages,
+ # Is this documentation versioned?
+ if [ -f "${pkg_path}/stable.txt" ]; then
+ mkdir -p "docs-archive/${package_name}"
+ for ver_path in "docs-archive/${package_name}"/*/ ; do
+ version="$(basename -- "${ver_path}")"
+ verbose_copy "docs-archive/${package_name}/${version}/." "dist/docs/${package_name}/${version}"
+ done
+ stable_version="$(cat "docs-archive/${package_name}/stable.txt")"
+ verbose_copy "docs-archive/${package_name}/${stable_version}/." "dist/docs/${package_name}/stable"
+ create_redirect "dist/docs/${package_name}/index.html" "/docs/${package_name}/stable/index.html"
+ else
+ verbose_copy "docs-archive/${package_name}/." "dist/docs/${package_name}/"
+ fi
+ done
+ # This file may already have been created during building landing pages,
# but when building a full site, it's worth regenerate
log "Preparing packages-metadata.json"
python dump-docs-packages-metadata.py > "dist/_gen/packages-metadata.json"