Browse Source

🔨 Add MkDocs hook that renames sections based on the first index file (#9737)

pull/9743/head
Sebastián Ramírez 2 years ago
committed by GitHub
parent
commit
51d3a8ff12
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      docs/az/mkdocs.yml
  2. 3
      docs/cs/mkdocs.yml
  3. 3
      docs/de/mkdocs.yml
  4. 2
      docs/em/docs/advanced/index.md
  5. 2
      docs/em/docs/advanced/security/index.md
  6. 2
      docs/em/docs/deployment/index.md
  7. 2
      docs/em/docs/tutorial/dependencies/index.md
  8. 2
      docs/em/docs/tutorial/index.md
  9. 2
      docs/em/docs/tutorial/security/index.md
  10. 3
      docs/em/mkdocs.yml
  11. 2
      docs/en/docs/advanced/index.md
  12. 2
      docs/en/docs/advanced/security/index.md
  13. 2
      docs/en/docs/deployment/index.md
  14. 2
      docs/en/docs/tutorial/dependencies/index.md
  15. 2
      docs/en/docs/tutorial/index.md
  16. 2
      docs/en/docs/tutorial/security/index.md
  17. 3
      docs/en/mkdocs.yml
  18. 2
      docs/es/docs/advanced/index.md
  19. 2
      docs/es/docs/tutorial/index.md
  20. 3
      docs/es/mkdocs.yml
  21. 3
      docs/fa/mkdocs.yml
  22. 2
      docs/fr/docs/advanced/index.md
  23. 2
      docs/fr/docs/deployment/index.md
  24. 3
      docs/fr/mkdocs.yml
  25. 3
      docs/he/mkdocs.yml
  26. 3
      docs/hy/mkdocs.yml
  27. 3
      docs/id/mkdocs.yml
  28. 3
      docs/it/mkdocs.yml
  29. 2
      docs/ja/docs/advanced/index.md
  30. 2
      docs/ja/docs/deployment/index.md
  31. 2
      docs/ja/docs/tutorial/index.md
  32. 3
      docs/ja/mkdocs.yml
  33. 2
      docs/ko/docs/tutorial/index.md
  34. 3
      docs/ko/mkdocs.yml
  35. 3
      docs/lo/mkdocs.yml
  36. 3
      docs/nl/mkdocs.yml
  37. 2
      docs/pl/docs/tutorial/index.md
  38. 3
      docs/pl/mkdocs.yml
  39. 2
      docs/pt/docs/advanced/index.md
  40. 2
      docs/pt/docs/deployment/index.md
  41. 2
      docs/pt/docs/tutorial/index.md
  42. 2
      docs/pt/docs/tutorial/security/index.md
  43. 3
      docs/pt/mkdocs.yml
  44. 2
      docs/ru/docs/deployment/index.md
  45. 2
      docs/ru/docs/tutorial/index.md
  46. 3
      docs/ru/mkdocs.yml
  47. 3
      docs/sq/mkdocs.yml
  48. 3
      docs/sv/mkdocs.yml
  49. 3
      docs/ta/mkdocs.yml
  50. 3
      docs/tr/mkdocs.yml
  51. 3
      docs/uk/mkdocs.yml
  52. 2
      docs/zh/docs/advanced/index.md
  53. 2
      docs/zh/docs/advanced/security/index.md
  54. 2
      docs/zh/docs/tutorial/dependencies/index.md
  55. 2
      docs/zh/docs/tutorial/index.md
  56. 2
      docs/zh/docs/tutorial/security/index.md
  57. 3
      docs/zh/mkdocs.yml
  58. 38
      scripts/mkdocs_hooks.py

3
docs/az/mkdocs.yml

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

3
docs/cs/mkdocs.yml

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

3
docs/de/mkdocs.yml

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

2
docs/em/docs/advanced/index.md

@ -1,4 +1,4 @@
# 🏧 👩‍💻 🦮 - 🎶
# 🏧 👩‍💻 🦮
## 🌖 ⚒

2
docs/em/docs/advanced/security/index.md

@ -1,4 +1,4 @@
# 🏧 💂‍♂ - 🎶
# 🏧 💂‍♂
## 🌖 ⚒

2
docs/em/docs/deployment/index.md

@ -1,4 +1,4 @@
# 🛠️ - 🎶
# 🛠️
🛠️ **FastAPI** 🈸 📶 ⏩.

2
docs/em/docs/tutorial/dependencies/index.md

@ -1,4 +1,4 @@
# 🔗 - 🥇 🔁
# 🔗
**FastAPI** ✔️ 📶 🏋️ ✋️ 🏋️ **<abbr title="also known as components, resources, providers, services, injectables">🔗 💉</abbr>** ⚙️.

2
docs/em/docs/tutorial/index.md

@ -1,4 +1,4 @@
# 🔰 - 👩‍💻 🦮 - 🎶
# 🔰 - 👩‍💻 🦮
👉 🔰 🎦 👆 ❔ ⚙️ **FastAPI** ⏮️ 🌅 🚮 ⚒, 🔁 🔁.

2
docs/em/docs/tutorial/security/index.md

@ -1,4 +1,4 @@
# 💂‍♂ 🎶
# 💂‍♂
📤 📚 🌌 🍵 💂‍♂, 🤝 &amp; ✔.

3
docs/em/mkdocs.yml

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

2
docs/en/docs/advanced/index.md

@ -1,4 +1,4 @@
# Advanced User Guide - Intro
# Advanced User Guide
## Additional Features

2
docs/en/docs/advanced/security/index.md

@ -1,4 +1,4 @@
# Advanced Security - Intro
# Advanced Security
## Additional Features

2
docs/en/docs/deployment/index.md

@ -1,4 +1,4 @@
# Deployment - Intro
# Deployment
Deploying a **FastAPI** application is relatively easy.

2
docs/en/docs/tutorial/dependencies/index.md

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

2
docs/en/docs/tutorial/index.md

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

2
docs/en/docs/tutorial/security/index.md

@ -1,4 +1,4 @@
# Security Intro
# Security
There are many ways to handle security, authentication and authorization.

3
docs/en/mkdocs.yml

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

2
docs/es/docs/advanced/index.md

@ -1,4 +1,4 @@
# Guía de Usuario Avanzada - Introducción
# Guía de Usuario Avanzada
## Características Adicionales

2
docs/es/docs/tutorial/index.md

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

3
docs/es/mkdocs.yml

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

3
docs/fa/mkdocs.yml

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

2
docs/fr/docs/advanced/index.md

@ -1,4 +1,4 @@
# Guide de l'utilisateur avancé - Introduction
# Guide de l'utilisateur avancé
## Caractéristiques supplémentaires

2
docs/fr/docs/deployment/index.md

@ -1,4 +1,4 @@
# Déploiement - Intro
# Déploiement
Le déploiement d'une application **FastAPI** est relativement simple.

3
docs/fr/mkdocs.yml

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

3
docs/he/mkdocs.yml

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

3
docs/hy/mkdocs.yml

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

3
docs/id/mkdocs.yml

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

3
docs/it/mkdocs.yml

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

2
docs/ja/docs/advanced/index.md

@ -1,4 +1,4 @@
# ユーザーガイド 応用編
# 高度なユーザーガイド
## さらなる機能

2
docs/ja/docs/deployment/index.md

@ -1,4 +1,4 @@
# デプロイ - イントロ
# デプロイ
**FastAPI** 製のアプリケーションは比較的容易にデプロイできます。

2
docs/ja/docs/tutorial/index.md

@ -1,4 +1,4 @@
# チュートリアル - ユーザーガイド - はじめに
# チュートリアル - ユーザーガイド
このチュートリアルは**FastAPI**のほぼすべての機能の使い方を段階的に紹介します。

3
docs/ja/mkdocs.yml

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

2
docs/ko/docs/tutorial/index.md

@ -1,4 +1,4 @@
# 자습서 - 사용자 안내서 - 도입부
# 자습서 - 사용자 안내서
이 자습서는 **FastAPI**의 대부분의 기능을 단계별로 사용하는 방법을 보여줍니다.

3
docs/ko/mkdocs.yml

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

3
docs/lo/mkdocs.yml

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

3
docs/nl/mkdocs.yml

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

2
docs/pl/docs/tutorial/index.md

@ -1,4 +1,4 @@
# Samouczek - Wprowadzenie
# Samouczek
Ten samouczek pokaże Ci, krok po kroku, jak używać większości funkcji **FastAPI**.

3
docs/pl/mkdocs.yml

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

2
docs/pt/docs/advanced/index.md

@ -1,4 +1,4 @@
# Guia de Usuário Avançado - Introdução
# Guia de Usuário Avançado
## Recursos Adicionais

2
docs/pt/docs/deployment/index.md

@ -1,4 +1,4 @@
# Implantação - Introdução
# Implantação
A implantação de uma aplicação **FastAPI** é relativamente simples.

2
docs/pt/docs/tutorial/index.md

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

2
docs/pt/docs/tutorial/security/index.md

@ -1,4 +1,4 @@
# Introdução à segurança
# Segurança
Há várias formas de lidar segurança, autenticação e autorização.

3
docs/pt/mkdocs.yml

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

2
docs/ru/docs/deployment/index.md

@ -1,4 +1,4 @@
# Развёртывание - Введение
# Развёртывание
Развернуть приложение **FastAPI** довольно просто.

2
docs/ru/docs/tutorial/index.md

@ -1,4 +1,4 @@
# Учебник - Руководство пользователя - Введение
# Учебник - Руководство пользователя
В этом руководстве шаг за шагом показано, как использовать **FastApi** с большинством его функций.

3
docs/ru/mkdocs.yml

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

3
docs/sq/mkdocs.yml

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

3
docs/sv/mkdocs.yml

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

3
docs/ta/mkdocs.yml

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

3
docs/tr/mkdocs.yml

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

3
docs/uk/mkdocs.yml

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

2
docs/zh/docs/advanced/index.md

@ -1,4 +1,4 @@
# 高级用户指南 - 简介
# 高级用户指南
## 额外特性

2
docs/zh/docs/advanced/security/index.md

@ -1,4 +1,4 @@
# 高级安全 - 介绍
# 高级安全
## 附加特性

2
docs/zh/docs/tutorial/dependencies/index.md

@ -1,4 +1,4 @@
# 依赖项 - 第一步
# 依赖项
FastAPI 提供了简单易用,但功能强大的**<abbr title="也称为组件、资源、提供者、服务、可注入项">依赖注入</abbr>**系统。

2
docs/zh/docs/tutorial/index.md

@ -1,4 +1,4 @@
# 教程 - 用户指南 - 简介
# 教程 - 用户指南
本教程将一步步向你展示如何使用 **FastAPI** 的绝大部分特性。

2
docs/zh/docs/tutorial/security/index.md

@ -1,4 +1,4 @@
# 安全性简介
# 安全性
有许多方法可以处理安全性、身份认证和授权等问题。

3
docs/zh/mkdocs.yml

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

38
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…
Cancel
Save