Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 Fix calling mkdocs for languages as a subprocess to fix/enable MkDocs Material search plugin #5501

Merged
merged 4 commits into from Oct 16, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
466 changes: 466 additions & 0 deletions docs/az/docs/index.md

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions docs/az/mkdocs.yml
Expand Up @@ -32,6 +32,7 @@ repo_name: tiangolo/fastapi
repo_url: https://github.com/tiangolo/fastapi
edit_uri: ''
plugins:
- search
- markdownextradata:
data: data
nav:
Expand Down
1 change: 1 addition & 0 deletions docs/de/mkdocs.yml
Expand Up @@ -32,6 +32,7 @@ repo_name: tiangolo/fastapi
repo_url: https://github.com/tiangolo/fastapi
edit_uri: ''
plugins:
- search
- markdownextradata:
data: data
nav:
Expand Down
1 change: 1 addition & 0 deletions docs/en/mkdocs.yml
Expand Up @@ -32,6 +32,7 @@ repo_name: tiangolo/fastapi
repo_url: https://github.com/tiangolo/fastapi
edit_uri: ''
plugins:
- search
- markdownextradata:
data: data
nav:
Expand Down
1 change: 1 addition & 0 deletions docs/es/mkdocs.yml
Expand Up @@ -32,6 +32,7 @@ repo_name: tiangolo/fastapi
repo_url: https://github.com/tiangolo/fastapi
edit_uri: ''
plugins:
- search
- markdownextradata:
data: data
nav:
Expand Down
1 change: 1 addition & 0 deletions docs/fa/mkdocs.yml
Expand Up @@ -32,6 +32,7 @@ repo_name: tiangolo/fastapi
repo_url: https://github.com/tiangolo/fastapi
edit_uri: ''
plugins:
- search
- markdownextradata:
data: data
nav:
Expand Down
1 change: 1 addition & 0 deletions docs/fr/mkdocs.yml
Expand Up @@ -32,6 +32,7 @@ repo_name: tiangolo/fastapi
repo_url: https://github.com/tiangolo/fastapi
edit_uri: ''
plugins:
- search
- markdownextradata:
data: data
nav:
Expand Down
1 change: 1 addition & 0 deletions docs/he/mkdocs.yml
Expand Up @@ -32,6 +32,7 @@ repo_name: tiangolo/fastapi
repo_url: https://github.com/tiangolo/fastapi
edit_uri: ''
plugins:
- search
- markdownextradata:
data: data
nav:
Expand Down
1 change: 1 addition & 0 deletions docs/id/mkdocs.yml
Expand Up @@ -32,6 +32,7 @@ repo_name: tiangolo/fastapi
repo_url: https://github.com/tiangolo/fastapi
edit_uri: ''
plugins:
- search
- markdownextradata:
data: data
nav:
Expand Down
1 change: 1 addition & 0 deletions docs/it/mkdocs.yml
Expand Up @@ -32,6 +32,7 @@ repo_name: tiangolo/fastapi
repo_url: https://github.com/tiangolo/fastapi
edit_uri: ''
plugins:
- search
- markdownextradata:
data: data
nav:
Expand Down
1 change: 1 addition & 0 deletions docs/ja/mkdocs.yml
Expand Up @@ -32,6 +32,7 @@ repo_name: tiangolo/fastapi
repo_url: https://github.com/tiangolo/fastapi
edit_uri: ''
plugins:
- search
- markdownextradata:
data: data
nav:
Expand Down
1 change: 1 addition & 0 deletions docs/ko/mkdocs.yml
Expand Up @@ -32,6 +32,7 @@ repo_name: tiangolo/fastapi
repo_url: https://github.com/tiangolo/fastapi
edit_uri: ''
plugins:
- search
- markdownextradata:
data: data
nav:
Expand Down
1 change: 1 addition & 0 deletions docs/nl/mkdocs.yml
Expand Up @@ -32,6 +32,7 @@ repo_name: tiangolo/fastapi
repo_url: https://github.com/tiangolo/fastapi
edit_uri: ''
plugins:
- search
- markdownextradata:
data: data
nav:
Expand Down
1 change: 1 addition & 0 deletions docs/pl/mkdocs.yml
Expand Up @@ -32,6 +32,7 @@ repo_name: tiangolo/fastapi
repo_url: https://github.com/tiangolo/fastapi
edit_uri: ''
plugins:
- search
- markdownextradata:
data: data
nav:
Expand Down
1 change: 1 addition & 0 deletions docs/pt/mkdocs.yml
Expand Up @@ -32,6 +32,7 @@ repo_name: tiangolo/fastapi
repo_url: https://github.com/tiangolo/fastapi
edit_uri: ''
plugins:
- search
- markdownextradata:
data: data
nav:
Expand Down
1 change: 1 addition & 0 deletions docs/ru/mkdocs.yml
Expand Up @@ -32,6 +32,7 @@ repo_name: tiangolo/fastapi
repo_url: https://github.com/tiangolo/fastapi
edit_uri: ''
plugins:
- search
- markdownextradata:
data: data
nav:
Expand Down
1 change: 1 addition & 0 deletions docs/sq/mkdocs.yml
Expand Up @@ -32,6 +32,7 @@ repo_name: tiangolo/fastapi
repo_url: https://github.com/tiangolo/fastapi
edit_uri: ''
plugins:
- search
- markdownextradata:
data: data
nav:
Expand Down
1 change: 1 addition & 0 deletions docs/sv/mkdocs.yml
Expand Up @@ -32,6 +32,7 @@ repo_name: tiangolo/fastapi
repo_url: https://github.com/tiangolo/fastapi
edit_uri: ''
plugins:
- search
- markdownextradata:
data: data
nav:
Expand Down
1 change: 1 addition & 0 deletions docs/tr/mkdocs.yml
Expand Up @@ -32,6 +32,7 @@ repo_name: tiangolo/fastapi
repo_url: https://github.com/tiangolo/fastapi
edit_uri: ''
plugins:
- search
- markdownextradata:
data: data
nav:
Expand Down
1 change: 1 addition & 0 deletions docs/uk/mkdocs.yml
Expand Up @@ -32,6 +32,7 @@ repo_name: tiangolo/fastapi
repo_url: https://github.com/tiangolo/fastapi
edit_uri: ''
plugins:
- search
- markdownextradata:
data: data
nav:
Expand Down
1 change: 1 addition & 0 deletions docs/zh/mkdocs.yml
Expand Up @@ -32,6 +32,7 @@ repo_name: tiangolo/fastapi
repo_url: https://github.com/tiangolo/fastapi
edit_uri: ''
plugins:
- search
- markdownextradata:
data: data
nav:
Expand Down
5 changes: 3 additions & 2 deletions scripts/docs.py
@@ -1,6 +1,7 @@
import os
import re
import shutil
import subprocess
from http.server import HTTPServer, SimpleHTTPRequestHandler
from multiprocessing import Pool
from pathlib import Path
Expand Down Expand Up @@ -200,7 +201,7 @@ def build_lang(
)
current_dir = os.getcwd()
os.chdir(build_lang_path)
mkdocs.commands.build.build(mkdocs.config.load_config(site_dir=str(dist_path)))
subprocess.run(["mkdocs", "build", "--site-dir", dist_path], check=True)
os.chdir(current_dir)
typer.secho(f"Successfully built docs for: {lang}", color=typer.colors.GREEN)

Expand Down Expand Up @@ -275,7 +276,7 @@ def build_all():
current_dir = os.getcwd()
os.chdir(en_docs_path)
typer.echo("Building docs for: en")
mkdocs.commands.build.build(mkdocs.config.load_config(site_dir=str(site_path)))
subprocess.run(["mkdocs", "build", "--site-dir", site_path], check=True)
os.chdir(current_dir)
langs = []
for lang in get_lang_paths():
Expand Down