Browse Source

Add newsletter: FastAPI and friends (#2509)

*  Add newsletter: FastAPI and friends

* 🔧 Update MkDocs config for announcement

* 🔧 Update generation script to include overrides for announcements
pull/2520/head
Sebastián Ramírez 4 years ago
committed by GitHub
parent
commit
e6f8aa8756
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 8
      docs/en/docs/css/custom.css
  2. 10
      docs/en/docs/help-fastapi.md
  3. 5
      docs/en/docs/newsletter.md
  4. 1
      docs/en/mkdocs.yml
  5. 9
      docs/en/overrides/main.html
  6. 1
      docs/es/mkdocs.yml
  7. 1
      docs/fr/mkdocs.yml
  8. 1
      docs/it/mkdocs.yml
  9. 1
      docs/ja/mkdocs.yml
  10. 1
      docs/ko/mkdocs.yml
  11. 1
      docs/pt/mkdocs.yml
  12. 1
      docs/ru/mkdocs.yml
  13. 1
      docs/tr/mkdocs.yml
  14. 1
      docs/uk/mkdocs.yml
  15. 1
      docs/zh/mkdocs.yml
  16. 1
      scripts/docs.py

8
docs/en/docs/css/custom.css

@ -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);
}

10
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. 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>. ⭐️

5
docs/en/docs/newsletter.md

@ -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>

1
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/ 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

9
docs/en/overrides/main.html

@ -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 %}

1
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/ 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

1
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/ 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

1
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/ 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

1
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/ 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

1
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/ 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

1
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/ 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

1
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/ 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

1
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/ 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

1
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/ 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

1
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/ 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

1
scripts/docs.py

@ -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"]

Loading…
Cancel
Save