]> git.ipfire.org Git - thirdparty/fastapi/fastapi.git/commitdiff
✨ Add newsletter: FastAPI and friends (#2509)
authorSebastián Ramírez <tiangolo@gmail.com>
Sun, 13 Dec 2020 15:33:46 +0000 (16:33 +0100)
committerGitHub <noreply@github.com>
Sun, 13 Dec 2020 15:33:46 +0000 (16:33 +0100)
* ✨ Add newsletter: FastAPI and friends

* 🔧 Update MkDocs config for announcement

* 🔧 Update generation script to include overrides for announcements

16 files changed:
docs/en/docs/css/custom.css
docs/en/docs/help-fastapi.md
docs/en/docs/newsletter.md [new file with mode: 0644]
docs/en/mkdocs.yml
docs/en/overrides/main.html [new file with mode: 0644]
docs/es/mkdocs.yml
docs/fr/mkdocs.yml
docs/it/mkdocs.yml
docs/ja/mkdocs.yml
docs/ko/mkdocs.yml
docs/pt/mkdocs.yml
docs/ru/mkdocs.yml
docs/tr/mkdocs.yml
docs/uk/mkdocs.yml
docs/zh/mkdocs.yml
scripts/docs.py

index 16dddc6ddb5827c4e75c0612b5b837b5a38ef872..ea408a11a8aa61ae45c4645a0685453f2cfaaaa2 100644 (file)
@@ -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);
+}
index b4b22cf1b95a99fa7a6e6939f2c5c133a541fab5..625e84ef6781f4daabb0bc3532ce7122b5243065 100644 (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.
 
+## 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): <a href="https://github.com/tiangolo/fastapi" class="external-link" target="_blank">https://github.com/tiangolo/fastapi</a>. ⭐️
diff --git a/docs/en/docs/newsletter.md b/docs/en/docs/newsletter.md
new file mode 100644 (file)
index 0000000..6403f31
--- /dev/null
@@ -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>
index 0f4a60070b003d102ecdf4b383983dbd6a30733d..7490f38ec3590270cf17d38b03d2a320144e9e0b 100644 (file)
@@ -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 (file)
index 0000000..87cc82c
--- /dev/null
@@ -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 %}
\ No newline at end of file
index 11927ded7a0e1ce37ee5447ff35f00ce39300f9d..5321fbf5c956d0235be420349859e7bb07c52e87 100644 (file)
@@ -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
index 61ac9dc7c32d86a6c27bad29d75c55c4468e88b2..d69644a7e6cd2ee64643bf19fb15989cddf6b076 100644 (file)
@@ -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
index 5a60e6b5030286f8779d35efbf22026f12a7bf01..da7c96e93abdcca019ef6602150c09f035ae39be 100644 (file)
@@ -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
index 7cb2d4293e67e0763316d2b6698b2926fc0b01a6..4d051ae61cc80151b81d2518de13461f58891c65 100644 (file)
@@ -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
index 3cd1fbee15b90135e56827c2493eb4ef760f3393..cb127e46ba5aa4c3042c766d0f179a6ec38ff912 100644 (file)
@@ -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
index a1ec90d4b21cdc3447d4d4d19a4943449752f5fe..8fb0a3ab1e8778d405c74ca55666cba22c391538 100644 (file)
@@ -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
index 8572645c661a32eda365cb7fe8f81ce2be90a0c8..5122964a5a314681f716b126c91ad99c668c95ad 100644 (file)
@@ -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
index 72ed61f9907d0e4beaa634d3d50a4a2bea3e30d8..0f090d7282dd99f24263a151dc927d0fc0d9a8a4 100644 (file)
@@ -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
index 355e42826616a4a0c5087f1bea220df162ea38e9..c0bc4ea177524840c542b5847b487064e8def06c 100644 (file)
@@ -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
index 3bb25229a31d2ef7ced4e4f4ad119facbd897467..ce7d57046e72db7df3c6b5feb2d3ea914d253dbd 100644 (file)
@@ -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
index e11bacb64698f368ac819716bced831855f932c3..00b6c831888939a8fd827d908feb1b582736cb76 100644 (file)
@@ -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"]