Add newsletter: FastAPI and friends (#2509)

*  Add newsletter: FastAPI and friends

* 🔧 Update MkDocs config for announcement

* 🔧 Update generation script to include overrides for announcements
This commit is contained in:
Sebastián Ramírez 2020-12-13 16:33:46 +01:00 committed by GitHub
parent f0a14a9ab6
commit e6f8aa8756
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
16 changed files with 44 additions and 0 deletions

View file

@ -55,3 +55,11 @@ a.internal-link::after {
font-size: 80%; font-size: 80%;
text-align: center; text-align: center;
} }
a.announce:link, a.announce:visited {
color: #fff;
}
a.announce:hover {
color: var(--md-accent-fg-color);
}

View file

@ -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. 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 ## Star **FastAPI** in GitHub
You can "star" FastAPI in GitHub (clicking the star button at the top right): <a href="https://github.com/tiangolo/fastapi" class="external-link" target="_blank">https://github.com/tiangolo/fastapi</a>. ⭐️ You can "star" FastAPI in GitHub (clicking the star button at the top right): <a href="https://github.com/tiangolo/fastapi" class="external-link" target="_blank">https://github.com/tiangolo/fastapi</a>. ⭐️

View file

@ -0,0 +1,5 @@
# FastAPI and friends newsletter
<iframe class="mj-w-res-iframe" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="https://app.mailjet.com/widget/iframe/6gQ4/GDo" width="100%"></iframe>
<script type="text/javascript" src="https://app.mailjet.com/statics/js/iframeResizer.min.js"></script>

View file

@ -3,6 +3,7 @@ site_description: FastAPI framework, high performance, easy to learn, fast to co
site_url: https://fastapi.tiangolo.com/ site_url: https://fastapi.tiangolo.com/
theme: theme:
name: material name: material
custom_dir: overrides
palette: palette:
- scheme: default - scheme: default
primary: teal primary: teal

View file

@ -0,0 +1,9 @@
{% extends "base.html" %}
{% block announce %}
<a class="announce" href="https://fastapi.tiangolo.com/newsletter/">
<span class="twemoji">
{% include ".icons/material/email.svg" %}
</span> Subscribe to the <strong>FastAPI and friends</strong> newsletter 🎉
</a>
{% endblock %}

View file

@ -3,6 +3,7 @@ site_description: FastAPI framework, high performance, easy to learn, fast to co
site_url: https://fastapi.tiangolo.com/es/ site_url: https://fastapi.tiangolo.com/es/
theme: theme:
name: material name: material
custom_dir: overrides
palette: palette:
- scheme: default - scheme: default
primary: teal primary: teal

View file

@ -3,6 +3,7 @@ site_description: FastAPI framework, high performance, easy to learn, fast to co
site_url: https://fastapi.tiangolo.com/fr/ site_url: https://fastapi.tiangolo.com/fr/
theme: theme:
name: material name: material
custom_dir: overrides
palette: palette:
- scheme: default - scheme: default
primary: teal primary: teal

View file

@ -3,6 +3,7 @@ site_description: FastAPI framework, high performance, easy to learn, fast to co
site_url: https://fastapi.tiangolo.com/it/ site_url: https://fastapi.tiangolo.com/it/
theme: theme:
name: material name: material
custom_dir: overrides
palette: palette:
- scheme: default - scheme: default
primary: teal primary: teal

View file

@ -3,6 +3,7 @@ site_description: FastAPI framework, high performance, easy to learn, fast to co
site_url: https://fastapi.tiangolo.com/ja/ site_url: https://fastapi.tiangolo.com/ja/
theme: theme:
name: material name: material
custom_dir: overrides
palette: palette:
- scheme: default - scheme: default
primary: teal primary: teal

View file

@ -3,6 +3,7 @@ site_description: FastAPI framework, high performance, easy to learn, fast to co
site_url: https://fastapi.tiangolo.com/ko/ site_url: https://fastapi.tiangolo.com/ko/
theme: theme:
name: material name: material
custom_dir: overrides
palette: palette:
- scheme: default - scheme: default
primary: teal primary: teal

View file

@ -3,6 +3,7 @@ site_description: FastAPI framework, high performance, easy to learn, fast to co
site_url: https://fastapi.tiangolo.com/pt/ site_url: https://fastapi.tiangolo.com/pt/
theme: theme:
name: material name: material
custom_dir: overrides
palette: palette:
- scheme: default - scheme: default
primary: teal primary: teal

View file

@ -3,6 +3,7 @@ site_description: FastAPI framework, high performance, easy to learn, fast to co
site_url: https://fastapi.tiangolo.com/ru/ site_url: https://fastapi.tiangolo.com/ru/
theme: theme:
name: material name: material
custom_dir: overrides
palette: palette:
- scheme: default - scheme: default
primary: teal primary: teal

View file

@ -3,6 +3,7 @@ site_description: FastAPI framework, high performance, easy to learn, fast to co
site_url: https://fastapi.tiangolo.com/tr/ site_url: https://fastapi.tiangolo.com/tr/
theme: theme:
name: material name: material
custom_dir: overrides
palette: palette:
- scheme: default - scheme: default
primary: teal primary: teal

View file

@ -3,6 +3,7 @@ site_description: FastAPI framework, high performance, easy to learn, fast to co
site_url: https://fastapi.tiangolo.com/uk/ site_url: https://fastapi.tiangolo.com/uk/
theme: theme:
name: material name: material
custom_dir: overrides
palette: palette:
- scheme: default - scheme: default
primary: teal primary: teal

View file

@ -3,6 +3,7 @@ site_description: FastAPI framework, high performance, easy to learn, fast to co
site_url: https://fastapi.tiangolo.com/zh/ site_url: https://fastapi.tiangolo.com/zh/
theme: theme:
name: material name: material
custom_dir: overrides
palette: palette:
- scheme: default - scheme: default
primary: teal primary: teal

View file

@ -136,6 +136,7 @@ def build_lang(
shutil.rmtree(build_lang_path, ignore_errors=True) shutil.rmtree(build_lang_path, ignore_errors=True)
shutil.copytree(lang_path, build_lang_path) shutil.copytree(lang_path, build_lang_path)
shutil.copytree(en_docs_path / "data", build_lang_path / "data") 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_path: Path = en_lang_path / mkdocs_name
en_config: dict = mkdocs.utils.yaml_load(en_config_path.read_text(encoding="utf-8")) en_config: dict = mkdocs.utils.yaml_load(en_config_path.read_text(encoding="utf-8"))
nav = en_config["nav"] nav = en_config["nav"]