mirror of https://github.com/tiangolo/fastapi.git
🔨 Add MkDocs hook that renames sections based on the first index file (#9737)
This commit is contained in:
parent
3aea9acc68
commit
51d3a8ff12
|
|
@ -23,6 +23,7 @@ theme:
|
|||
- search.suggest
|
||||
- search.highlight
|
||||
- content.tabs.link
|
||||
- navigation.indexes
|
||||
icon:
|
||||
repo: fontawesome/brands/github-alt
|
||||
logo: https://fastapi.tiangolo.com/img/icon-white.svg
|
||||
|
|
@ -158,3 +159,5 @@ extra_css:
|
|||
extra_javascript:
|
||||
- https://fastapi.tiangolo.com/js/termynal.js
|
||||
- https://fastapi.tiangolo.com/js/custom.js
|
||||
hooks:
|
||||
- ../../scripts/mkdocs_hooks.py
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@ theme:
|
|||
- search.suggest
|
||||
- search.highlight
|
||||
- content.tabs.link
|
||||
- navigation.indexes
|
||||
icon:
|
||||
repo: fontawesome/brands/github-alt
|
||||
logo: https://fastapi.tiangolo.com/img/icon-white.svg
|
||||
|
|
@ -158,3 +159,5 @@ extra_css:
|
|||
extra_javascript:
|
||||
- https://fastapi.tiangolo.com/js/termynal.js
|
||||
- https://fastapi.tiangolo.com/js/custom.js
|
||||
hooks:
|
||||
- ../../scripts/mkdocs_hooks.py
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@ theme:
|
|||
- search.suggest
|
||||
- search.highlight
|
||||
- content.tabs.link
|
||||
- navigation.indexes
|
||||
icon:
|
||||
repo: fontawesome/brands/github-alt
|
||||
logo: https://fastapi.tiangolo.com/img/icon-white.svg
|
||||
|
|
@ -159,3 +160,5 @@ extra_css:
|
|||
extra_javascript:
|
||||
- https://fastapi.tiangolo.com/js/termynal.js
|
||||
- https://fastapi.tiangolo.com/js/custom.js
|
||||
hooks:
|
||||
- ../../scripts/mkdocs_hooks.py
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
# 🏧 👩💻 🦮 - 🎶
|
||||
# 🏧 👩💻 🦮
|
||||
|
||||
## 🌖 ⚒
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
# 🏧 💂♂ - 🎶
|
||||
# 🏧 💂♂
|
||||
|
||||
## 🌖 ⚒
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
# 🛠️ - 🎶
|
||||
# 🛠️
|
||||
|
||||
🛠️ **FastAPI** 🈸 📶 ⏩.
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
# 🔗 - 🥇 🔁
|
||||
# 🔗
|
||||
|
||||
**FastAPI** ✔️ 📶 🏋️ ✋️ 🏋️ **<abbr title="also known as components, resources, providers, services, injectables">🔗 💉</abbr>** ⚙️.
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
# 🔰 - 👩💻 🦮 - 🎶
|
||||
# 🔰 - 👩💻 🦮
|
||||
|
||||
👉 🔰 🎦 👆 ❔ ⚙️ **FastAPI** ⏮️ 🌅 🚮 ⚒, 🔁 🔁.
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
# 💂♂ 🎶
|
||||
# 💂♂
|
||||
|
||||
📤 📚 🌌 🍵 💂♂, 🤝 & ✔.
|
||||
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@ theme:
|
|||
- search.suggest
|
||||
- search.highlight
|
||||
- content.tabs.link
|
||||
- navigation.indexes
|
||||
icon:
|
||||
repo: fontawesome/brands/github-alt
|
||||
logo: https://fastapi.tiangolo.com/img/icon-white.svg
|
||||
|
|
@ -265,3 +266,5 @@ extra_css:
|
|||
extra_javascript:
|
||||
- https://fastapi.tiangolo.com/js/termynal.js
|
||||
- https://fastapi.tiangolo.com/js/custom.js
|
||||
hooks:
|
||||
- ../../scripts/mkdocs_hooks.py
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
# Advanced User Guide - Intro
|
||||
# Advanced User Guide
|
||||
|
||||
## Additional Features
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
# Advanced Security - Intro
|
||||
# Advanced Security
|
||||
|
||||
## Additional Features
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
# Deployment - Intro
|
||||
# Deployment
|
||||
|
||||
Deploying a **FastAPI** application is relatively easy.
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
# Dependencies - First Steps
|
||||
# Dependencies
|
||||
|
||||
**FastAPI** has a very powerful but intuitive **<abbr title="also known as components, resources, providers, services, injectables">Dependency Injection</abbr>** system.
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
# Tutorial - User Guide - Intro
|
||||
# Tutorial - User Guide
|
||||
|
||||
This tutorial shows you how to use **FastAPI** with most of its features, step by step.
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
# Security Intro
|
||||
# Security
|
||||
|
||||
There are many ways to handle security, authentication and authorization.
|
||||
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@ theme:
|
|||
- search.suggest
|
||||
- search.highlight
|
||||
- content.tabs.link
|
||||
- navigation.indexes
|
||||
icon:
|
||||
repo: fontawesome/brands/github-alt
|
||||
logo: img/icon-white.svg
|
||||
|
|
@ -265,3 +266,5 @@ extra_css:
|
|||
extra_javascript:
|
||||
- js/termynal.js
|
||||
- js/custom.js
|
||||
hooks:
|
||||
- ../../scripts/mkdocs_hooks.py
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
# Guía de Usuario Avanzada - Introducción
|
||||
# Guía de Usuario Avanzada
|
||||
|
||||
## Características Adicionales
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
# Tutorial - Guía de Usuario - Introducción
|
||||
# Tutorial - Guía de Usuario
|
||||
|
||||
Este tutorial te muestra cómo usar **FastAPI** con la mayoría de sus características paso a paso.
|
||||
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@ theme:
|
|||
- search.suggest
|
||||
- search.highlight
|
||||
- content.tabs.link
|
||||
- navigation.indexes
|
||||
icon:
|
||||
repo: fontawesome/brands/github-alt
|
||||
logo: https://fastapi.tiangolo.com/img/icon-white.svg
|
||||
|
|
@ -168,3 +169,5 @@ extra_css:
|
|||
extra_javascript:
|
||||
- https://fastapi.tiangolo.com/js/termynal.js
|
||||
- https://fastapi.tiangolo.com/js/custom.js
|
||||
hooks:
|
||||
- ../../scripts/mkdocs_hooks.py
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@ theme:
|
|||
- search.suggest
|
||||
- search.highlight
|
||||
- content.tabs.link
|
||||
- navigation.indexes
|
||||
icon:
|
||||
repo: fontawesome/brands/github-alt
|
||||
logo: https://fastapi.tiangolo.com/img/icon-white.svg
|
||||
|
|
@ -158,3 +159,5 @@ extra_css:
|
|||
extra_javascript:
|
||||
- https://fastapi.tiangolo.com/js/termynal.js
|
||||
- https://fastapi.tiangolo.com/js/custom.js
|
||||
hooks:
|
||||
- ../../scripts/mkdocs_hooks.py
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
# Guide de l'utilisateur avancé - Introduction
|
||||
# Guide de l'utilisateur avancé
|
||||
|
||||
## Caractéristiques supplémentaires
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
# Déploiement - Intro
|
||||
# Déploiement
|
||||
|
||||
Le déploiement d'une application **FastAPI** est relativement simple.
|
||||
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@ theme:
|
|||
- search.suggest
|
||||
- search.highlight
|
||||
- content.tabs.link
|
||||
- navigation.indexes
|
||||
icon:
|
||||
repo: fontawesome/brands/github-alt
|
||||
logo: https://fastapi.tiangolo.com/img/icon-white.svg
|
||||
|
|
@ -187,3 +188,5 @@ extra_css:
|
|||
extra_javascript:
|
||||
- https://fastapi.tiangolo.com/js/termynal.js
|
||||
- https://fastapi.tiangolo.com/js/custom.js
|
||||
hooks:
|
||||
- ../../scripts/mkdocs_hooks.py
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@ theme:
|
|||
- search.suggest
|
||||
- search.highlight
|
||||
- content.tabs.link
|
||||
- navigation.indexes
|
||||
icon:
|
||||
repo: fontawesome/brands/github-alt
|
||||
logo: https://fastapi.tiangolo.com/img/icon-white.svg
|
||||
|
|
@ -158,3 +159,5 @@ extra_css:
|
|||
extra_javascript:
|
||||
- https://fastapi.tiangolo.com/js/termynal.js
|
||||
- https://fastapi.tiangolo.com/js/custom.js
|
||||
hooks:
|
||||
- ../../scripts/mkdocs_hooks.py
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@ theme:
|
|||
- search.suggest
|
||||
- search.highlight
|
||||
- content.tabs.link
|
||||
- navigation.indexes
|
||||
icon:
|
||||
repo: fontawesome/brands/github-alt
|
||||
logo: https://fastapi.tiangolo.com/img/icon-white.svg
|
||||
|
|
@ -158,3 +159,5 @@ extra_css:
|
|||
extra_javascript:
|
||||
- https://fastapi.tiangolo.com/js/termynal.js
|
||||
- https://fastapi.tiangolo.com/js/custom.js
|
||||
hooks:
|
||||
- ../../scripts/mkdocs_hooks.py
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@ theme:
|
|||
- search.suggest
|
||||
- search.highlight
|
||||
- content.tabs.link
|
||||
- navigation.indexes
|
||||
icon:
|
||||
repo: fontawesome/brands/github-alt
|
||||
logo: https://fastapi.tiangolo.com/img/icon-white.svg
|
||||
|
|
@ -158,3 +159,5 @@ extra_css:
|
|||
extra_javascript:
|
||||
- https://fastapi.tiangolo.com/js/termynal.js
|
||||
- https://fastapi.tiangolo.com/js/custom.js
|
||||
hooks:
|
||||
- ../../scripts/mkdocs_hooks.py
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@ theme:
|
|||
- search.suggest
|
||||
- search.highlight
|
||||
- content.tabs.link
|
||||
- navigation.indexes
|
||||
icon:
|
||||
repo: fontawesome/brands/github-alt
|
||||
logo: https://fastapi.tiangolo.com/img/icon-white.svg
|
||||
|
|
@ -158,3 +159,5 @@ extra_css:
|
|||
extra_javascript:
|
||||
- https://fastapi.tiangolo.com/js/termynal.js
|
||||
- https://fastapi.tiangolo.com/js/custom.js
|
||||
hooks:
|
||||
- ../../scripts/mkdocs_hooks.py
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
# ユーザーガイド 応用編
|
||||
# 高度なユーザーガイド
|
||||
|
||||
## さらなる機能
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
# デプロイ - イントロ
|
||||
# デプロイ
|
||||
|
||||
**FastAPI** 製のアプリケーションは比較的容易にデプロイできます。
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
# チュートリアル - ユーザーガイド - はじめに
|
||||
# チュートリアル - ユーザーガイド
|
||||
|
||||
このチュートリアルは**FastAPI**のほぼすべての機能の使い方を段階的に紹介します。
|
||||
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@ theme:
|
|||
- search.suggest
|
||||
- search.highlight
|
||||
- content.tabs.link
|
||||
- navigation.indexes
|
||||
icon:
|
||||
repo: fontawesome/brands/github-alt
|
||||
logo: https://fastapi.tiangolo.com/img/icon-white.svg
|
||||
|
|
@ -202,3 +203,5 @@ extra_css:
|
|||
extra_javascript:
|
||||
- https://fastapi.tiangolo.com/js/termynal.js
|
||||
- https://fastapi.tiangolo.com/js/custom.js
|
||||
hooks:
|
||||
- ../../scripts/mkdocs_hooks.py
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
# 자습서 - 사용자 안내서 - 도입부
|
||||
# 자습서 - 사용자 안내서
|
||||
|
||||
이 자습서는 **FastAPI**의 대부분의 기능을 단계별로 사용하는 방법을 보여줍니다.
|
||||
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@ theme:
|
|||
- search.suggest
|
||||
- search.highlight
|
||||
- content.tabs.link
|
||||
- navigation.indexes
|
||||
icon:
|
||||
repo: fontawesome/brands/github-alt
|
||||
logo: https://fastapi.tiangolo.com/img/icon-white.svg
|
||||
|
|
@ -172,3 +173,5 @@ extra_css:
|
|||
extra_javascript:
|
||||
- https://fastapi.tiangolo.com/js/termynal.js
|
||||
- https://fastapi.tiangolo.com/js/custom.js
|
||||
hooks:
|
||||
- ../../scripts/mkdocs_hooks.py
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@ theme:
|
|||
- search.suggest
|
||||
- search.highlight
|
||||
- content.tabs.link
|
||||
- navigation.indexes
|
||||
icon:
|
||||
repo: fontawesome/brands/github-alt
|
||||
logo: https://fastapi.tiangolo.com/img/icon-white.svg
|
||||
|
|
@ -158,3 +159,5 @@ extra_css:
|
|||
extra_javascript:
|
||||
- https://fastapi.tiangolo.com/js/termynal.js
|
||||
- https://fastapi.tiangolo.com/js/custom.js
|
||||
hooks:
|
||||
- ../../scripts/mkdocs_hooks.py
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@ theme:
|
|||
- search.suggest
|
||||
- search.highlight
|
||||
- content.tabs.link
|
||||
- navigation.indexes
|
||||
icon:
|
||||
repo: fontawesome/brands/github-alt
|
||||
logo: https://fastapi.tiangolo.com/img/icon-white.svg
|
||||
|
|
@ -158,3 +159,5 @@ extra_css:
|
|||
extra_javascript:
|
||||
- https://fastapi.tiangolo.com/js/termynal.js
|
||||
- https://fastapi.tiangolo.com/js/custom.js
|
||||
hooks:
|
||||
- ../../scripts/mkdocs_hooks.py
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
# Samouczek - Wprowadzenie
|
||||
# Samouczek
|
||||
|
||||
Ten samouczek pokaże Ci, krok po kroku, jak używać większości funkcji **FastAPI**.
|
||||
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@ theme:
|
|||
- search.suggest
|
||||
- search.highlight
|
||||
- content.tabs.link
|
||||
- navigation.indexes
|
||||
icon:
|
||||
repo: fontawesome/brands/github-alt
|
||||
logo: https://fastapi.tiangolo.com/img/icon-white.svg
|
||||
|
|
@ -162,3 +163,5 @@ extra_css:
|
|||
extra_javascript:
|
||||
- https://fastapi.tiangolo.com/js/termynal.js
|
||||
- https://fastapi.tiangolo.com/js/custom.js
|
||||
hooks:
|
||||
- ../../scripts/mkdocs_hooks.py
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
# Guia de Usuário Avançado - Introdução
|
||||
# Guia de Usuário Avançado
|
||||
|
||||
## Recursos Adicionais
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
# Implantação - Introdução
|
||||
# Implantação
|
||||
|
||||
A implantação de uma aplicação **FastAPI** é relativamente simples.
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
# Tutorial - Guia de Usuário - Introdução
|
||||
# Tutorial - Guia de Usuário
|
||||
|
||||
Esse tutorial mostra como usar o **FastAPI** com a maior parte de seus recursos, passo a passo.
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
# Introdução à segurança
|
||||
# Segurança
|
||||
|
||||
Há várias formas de lidar segurança, autenticação e autorização.
|
||||
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@ theme:
|
|||
- search.suggest
|
||||
- search.highlight
|
||||
- content.tabs.link
|
||||
- navigation.indexes
|
||||
icon:
|
||||
repo: fontawesome/brands/github-alt
|
||||
logo: https://fastapi.tiangolo.com/img/icon-white.svg
|
||||
|
|
@ -199,3 +200,5 @@ extra_css:
|
|||
extra_javascript:
|
||||
- https://fastapi.tiangolo.com/js/termynal.js
|
||||
- https://fastapi.tiangolo.com/js/custom.js
|
||||
hooks:
|
||||
- ../../scripts/mkdocs_hooks.py
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
# Развёртывание - Введение
|
||||
# Развёртывание
|
||||
|
||||
Развернуть приложение **FastAPI** довольно просто.
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
# Учебник - Руководство пользователя - Введение
|
||||
# Учебник - Руководство пользователя
|
||||
|
||||
В этом руководстве шаг за шагом показано, как использовать **FastApi** с большинством его функций.
|
||||
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@ theme:
|
|||
- search.suggest
|
||||
- search.highlight
|
||||
- content.tabs.link
|
||||
- navigation.indexes
|
||||
icon:
|
||||
repo: fontawesome/brands/github-alt
|
||||
logo: https://fastapi.tiangolo.com/img/icon-white.svg
|
||||
|
|
@ -197,3 +198,5 @@ extra_css:
|
|||
extra_javascript:
|
||||
- https://fastapi.tiangolo.com/js/termynal.js
|
||||
- https://fastapi.tiangolo.com/js/custom.js
|
||||
hooks:
|
||||
- ../../scripts/mkdocs_hooks.py
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@ theme:
|
|||
- search.suggest
|
||||
- search.highlight
|
||||
- content.tabs.link
|
||||
- navigation.indexes
|
||||
icon:
|
||||
repo: fontawesome/brands/github-alt
|
||||
logo: https://fastapi.tiangolo.com/img/icon-white.svg
|
||||
|
|
@ -158,3 +159,5 @@ extra_css:
|
|||
extra_javascript:
|
||||
- https://fastapi.tiangolo.com/js/termynal.js
|
||||
- https://fastapi.tiangolo.com/js/custom.js
|
||||
hooks:
|
||||
- ../../scripts/mkdocs_hooks.py
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@ theme:
|
|||
- search.suggest
|
||||
- search.highlight
|
||||
- content.tabs.link
|
||||
- navigation.indexes
|
||||
icon:
|
||||
repo: fontawesome/brands/github-alt
|
||||
logo: https://fastapi.tiangolo.com/img/icon-white.svg
|
||||
|
|
@ -158,3 +159,5 @@ extra_css:
|
|||
extra_javascript:
|
||||
- https://fastapi.tiangolo.com/js/termynal.js
|
||||
- https://fastapi.tiangolo.com/js/custom.js
|
||||
hooks:
|
||||
- ../../scripts/mkdocs_hooks.py
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@ theme:
|
|||
- search.suggest
|
||||
- search.highlight
|
||||
- content.tabs.link
|
||||
- navigation.indexes
|
||||
icon:
|
||||
repo: fontawesome/brands/github-alt
|
||||
logo: https://fastapi.tiangolo.com/img/icon-white.svg
|
||||
|
|
@ -158,3 +159,5 @@ extra_css:
|
|||
extra_javascript:
|
||||
- https://fastapi.tiangolo.com/js/termynal.js
|
||||
- https://fastapi.tiangolo.com/js/custom.js
|
||||
hooks:
|
||||
- ../../scripts/mkdocs_hooks.py
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@ theme:
|
|||
- search.suggest
|
||||
- search.highlight
|
||||
- content.tabs.link
|
||||
- navigation.indexes
|
||||
icon:
|
||||
repo: fontawesome/brands/github-alt
|
||||
logo: https://fastapi.tiangolo.com/img/icon-white.svg
|
||||
|
|
@ -163,3 +164,5 @@ extra_css:
|
|||
extra_javascript:
|
||||
- https://fastapi.tiangolo.com/js/termynal.js
|
||||
- https://fastapi.tiangolo.com/js/custom.js
|
||||
hooks:
|
||||
- ../../scripts/mkdocs_hooks.py
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@ theme:
|
|||
- search.suggest
|
||||
- search.highlight
|
||||
- content.tabs.link
|
||||
- navigation.indexes
|
||||
icon:
|
||||
repo: fontawesome/brands/github-alt
|
||||
logo: https://fastapi.tiangolo.com/img/icon-white.svg
|
||||
|
|
@ -158,3 +159,5 @@ extra_css:
|
|||
extra_javascript:
|
||||
- https://fastapi.tiangolo.com/js/termynal.js
|
||||
- https://fastapi.tiangolo.com/js/custom.js
|
||||
hooks:
|
||||
- ../../scripts/mkdocs_hooks.py
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
# 高级用户指南 - 简介
|
||||
# 高级用户指南
|
||||
|
||||
## 额外特性
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
# 高级安全 - 介绍
|
||||
# 高级安全
|
||||
|
||||
## 附加特性
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
# 依赖项 - 第一步
|
||||
# 依赖项
|
||||
|
||||
FastAPI 提供了简单易用,但功能强大的**<abbr title="也称为组件、资源、提供者、服务、可注入项">依赖注入</abbr>**系统。
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
# 教程 - 用户指南 - 简介
|
||||
# 教程 - 用户指南
|
||||
|
||||
本教程将一步步向你展示如何使用 **FastAPI** 的绝大部分特性。
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
# 安全性简介
|
||||
# 安全性
|
||||
|
||||
有许多方法可以处理安全性、身份认证和授权等问题。
|
||||
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@ theme:
|
|||
- search.suggest
|
||||
- search.highlight
|
||||
- content.tabs.link
|
||||
- navigation.indexes
|
||||
icon:
|
||||
repo: fontawesome/brands/github-alt
|
||||
logo: https://fastapi.tiangolo.com/img/icon-white.svg
|
||||
|
|
@ -223,3 +224,5 @@ extra_css:
|
|||
extra_javascript:
|
||||
- https://fastapi.tiangolo.com/js/termynal.js
|
||||
- https://fastapi.tiangolo.com/js/custom.js
|
||||
hooks:
|
||||
- ../../scripts/mkdocs_hooks.py
|
||||
|
|
|
|||
|
|
@ -0,0 +1,38 @@
|
|||
from typing import Any, List, Union
|
||||
|
||||
from mkdocs.config.defaults import MkDocsConfig
|
||||
from mkdocs.structure.files import Files
|
||||
from mkdocs.structure.nav import Link, Navigation, Section
|
||||
from mkdocs.structure.pages import Page
|
||||
|
||||
|
||||
def generate_renamed_section_items(
|
||||
items: List[Union[Page, Section, Link]], *, config: MkDocsConfig
|
||||
) -> List[Union[Page, Section, Link]]:
|
||||
new_items: List[Union[Page, Section, Link]] = []
|
||||
for item in items:
|
||||
if isinstance(item, Section):
|
||||
new_title = item.title
|
||||
new_children = generate_renamed_section_items(item.children, config=config)
|
||||
first_child = new_children[0]
|
||||
if isinstance(first_child, Page):
|
||||
if first_child.file.src_path.endswith("index.md"):
|
||||
# Read the source so that the title is parsed and available
|
||||
first_child.read_source(config=config)
|
||||
new_title = first_child.title or new_title
|
||||
# Creating a new section makes it render it collapsed by default
|
||||
# no idea why, so, let's just modify the existing one
|
||||
# new_section = Section(title=new_title, children=new_children)
|
||||
item.title = new_title
|
||||
item.children = new_children
|
||||
new_items.append(item)
|
||||
else:
|
||||
new_items.append(item)
|
||||
return new_items
|
||||
|
||||
|
||||
def on_nav(
|
||||
nav: Navigation, *, config: MkDocsConfig, files: Files, **kwargs: Any
|
||||
) -> Navigation:
|
||||
new_items = generate_renamed_section_items(nav.items, config=config)
|
||||
return Navigation(items=new_items, pages=nav.pages)
|
||||
Loading…
Reference in New Issue