diff --git a/docs/en/docs/css/custom.css b/docs/en/docs/css/custom.css index 16dddc6dd..ea408a11a 100644 --- a/docs/en/docs/css/custom.css +++ b/docs/en/docs/css/custom.css @@ -55,3 +55,11 @@ a.internal-link::after { font-size: 80%; text-align: center; } + +a.announce:link, a.announce:visited { + color: #fff; +} + +a.announce:hover { + color: var(--md-accent-fg-color); +} diff --git a/docs/en/docs/help-fastapi.md b/docs/en/docs/help-fastapi.md index b4b22cf1b..625e84ef6 100644 --- a/docs/en/docs/help-fastapi.md +++ b/docs/en/docs/help-fastapi.md @@ -10,6 +10,16 @@ There are very simple ways to help (several involve just one or two clicks). And there are several ways to get help too. +## Subscribe to the newsletter + +You can subscribe to the (infrequent) [**FastAPI and friends** newsletter](/newsletter/){.internal-link target=_blank} to stay updated about: + +* News about FastAPI and friends 🚀 +* Guides 📝 +* Features ✨ +* Breaking changes 🚨 +* Tips and tricks ✅ + ## Star **FastAPI** in GitHub You can "star" FastAPI in GitHub (clicking the star button at the top right): https://github.com/tiangolo/fastapi. ⭐️ diff --git a/docs/en/docs/newsletter.md b/docs/en/docs/newsletter.md new file mode 100644 index 000000000..6403f31e6 --- /dev/null +++ b/docs/en/docs/newsletter.md @@ -0,0 +1,5 @@ +# FastAPI and friends newsletter + + + + diff --git a/docs/en/mkdocs.yml b/docs/en/mkdocs.yml index 0f4a60070..7490f38ec 100644 --- a/docs/en/mkdocs.yml +++ b/docs/en/mkdocs.yml @@ -3,6 +3,7 @@ site_description: FastAPI framework, high performance, easy to learn, fast to co site_url: https://fastapi.tiangolo.com/ theme: name: material + custom_dir: overrides palette: - scheme: default primary: teal diff --git a/docs/en/overrides/main.html b/docs/en/overrides/main.html new file mode 100644 index 000000000..87cc82ce7 --- /dev/null +++ b/docs/en/overrides/main.html @@ -0,0 +1,9 @@ +{% extends "base.html" %} + +{% block announce %} + + + {% include ".icons/material/email.svg" %} + Subscribe to the FastAPI and friends newsletter 🎉 + +{% endblock %} \ No newline at end of file diff --git a/docs/es/mkdocs.yml b/docs/es/mkdocs.yml index 11927ded7..5321fbf5c 100644 --- a/docs/es/mkdocs.yml +++ b/docs/es/mkdocs.yml @@ -3,6 +3,7 @@ site_description: FastAPI framework, high performance, easy to learn, fast to co site_url: https://fastapi.tiangolo.com/es/ theme: name: material + custom_dir: overrides palette: - scheme: default primary: teal diff --git a/docs/fr/mkdocs.yml b/docs/fr/mkdocs.yml index 61ac9dc7c..d69644a7e 100644 --- a/docs/fr/mkdocs.yml +++ b/docs/fr/mkdocs.yml @@ -3,6 +3,7 @@ site_description: FastAPI framework, high performance, easy to learn, fast to co site_url: https://fastapi.tiangolo.com/fr/ theme: name: material + custom_dir: overrides palette: - scheme: default primary: teal diff --git a/docs/it/mkdocs.yml b/docs/it/mkdocs.yml index 5a60e6b50..da7c96e93 100644 --- a/docs/it/mkdocs.yml +++ b/docs/it/mkdocs.yml @@ -3,6 +3,7 @@ site_description: FastAPI framework, high performance, easy to learn, fast to co site_url: https://fastapi.tiangolo.com/it/ theme: name: material + custom_dir: overrides palette: - scheme: default primary: teal diff --git a/docs/ja/mkdocs.yml b/docs/ja/mkdocs.yml index 7cb2d4293..4d051ae61 100644 --- a/docs/ja/mkdocs.yml +++ b/docs/ja/mkdocs.yml @@ -3,6 +3,7 @@ site_description: FastAPI framework, high performance, easy to learn, fast to co site_url: https://fastapi.tiangolo.com/ja/ theme: name: material + custom_dir: overrides palette: - scheme: default primary: teal diff --git a/docs/ko/mkdocs.yml b/docs/ko/mkdocs.yml index 3cd1fbee1..cb127e46b 100644 --- a/docs/ko/mkdocs.yml +++ b/docs/ko/mkdocs.yml @@ -3,6 +3,7 @@ site_description: FastAPI framework, high performance, easy to learn, fast to co site_url: https://fastapi.tiangolo.com/ko/ theme: name: material + custom_dir: overrides palette: - scheme: default primary: teal diff --git a/docs/pt/mkdocs.yml b/docs/pt/mkdocs.yml index a1ec90d4b..8fb0a3ab1 100644 --- a/docs/pt/mkdocs.yml +++ b/docs/pt/mkdocs.yml @@ -3,6 +3,7 @@ site_description: FastAPI framework, high performance, easy to learn, fast to co site_url: https://fastapi.tiangolo.com/pt/ theme: name: material + custom_dir: overrides palette: - scheme: default primary: teal diff --git a/docs/ru/mkdocs.yml b/docs/ru/mkdocs.yml index 8572645c6..5122964a5 100644 --- a/docs/ru/mkdocs.yml +++ b/docs/ru/mkdocs.yml @@ -3,6 +3,7 @@ site_description: FastAPI framework, high performance, easy to learn, fast to co site_url: https://fastapi.tiangolo.com/ru/ theme: name: material + custom_dir: overrides palette: - scheme: default primary: teal diff --git a/docs/tr/mkdocs.yml b/docs/tr/mkdocs.yml index 72ed61f99..0f090d728 100644 --- a/docs/tr/mkdocs.yml +++ b/docs/tr/mkdocs.yml @@ -3,6 +3,7 @@ site_description: FastAPI framework, high performance, easy to learn, fast to co site_url: https://fastapi.tiangolo.com/tr/ theme: name: material + custom_dir: overrides palette: - scheme: default primary: teal diff --git a/docs/uk/mkdocs.yml b/docs/uk/mkdocs.yml index 355e42826..c0bc4ea17 100644 --- a/docs/uk/mkdocs.yml +++ b/docs/uk/mkdocs.yml @@ -3,6 +3,7 @@ site_description: FastAPI framework, high performance, easy to learn, fast to co site_url: https://fastapi.tiangolo.com/uk/ theme: name: material + custom_dir: overrides palette: - scheme: default primary: teal diff --git a/docs/zh/mkdocs.yml b/docs/zh/mkdocs.yml index 3bb25229a..ce7d57046 100644 --- a/docs/zh/mkdocs.yml +++ b/docs/zh/mkdocs.yml @@ -3,6 +3,7 @@ site_description: FastAPI framework, high performance, easy to learn, fast to co site_url: https://fastapi.tiangolo.com/zh/ theme: name: material + custom_dir: overrides palette: - scheme: default primary: teal diff --git a/scripts/docs.py b/scripts/docs.py index e11bacb64..00b6c8318 100644 --- a/scripts/docs.py +++ b/scripts/docs.py @@ -136,6 +136,7 @@ def build_lang( shutil.rmtree(build_lang_path, ignore_errors=True) shutil.copytree(lang_path, build_lang_path) shutil.copytree(en_docs_path / "data", build_lang_path / "data") + shutil.copytree(en_docs_path / "overrides", build_lang_path / "overrides") en_config_path: Path = en_lang_path / mkdocs_name en_config: dict = mkdocs.utils.yaml_load(en_config_path.read_text(encoding="utf-8")) nav = en_config["nav"]