From 77dea5f398499eec1f1056ef55b3510de085d70b Mon Sep 17 00:00:00 2001 From: Kattni Date: Mon, 2 Feb 2026 00:57:44 -0500 Subject: [PATCH] Config updates for website migration compatibility. --- docs/config.yml | 45 +++++++++++++++++++++++++++++++++++++++++-- docs/mkdocs.de.yml | 8 ++++++++ docs/mkdocs.en.yml | 1 + docs/mkdocs.es.yml | 8 ++++++++ docs/mkdocs.fr.yml | 8 ++++++++ docs/mkdocs.it.yml | 8 ++++++++ docs/mkdocs.pt.yml | 8 ++++++++ docs/mkdocs.zh_CN.yml | 10 +++++++++- docs/mkdocs.zh_TW.yml | 10 +++++++++- pyproject.toml | 5 +++-- tox.ini | 2 +- 11 files changed, 106 insertions(+), 7 deletions(-) diff --git a/docs/config.yml b/docs/config.yml index f6a1ea3..970aafc 100644 --- a/docs/config.yml +++ b/docs/config.yml @@ -47,6 +47,7 @@ extra: - icon: fontawesome/brands/discord link: https://beeware.org/bee/chat/ name: BeeWare on Discord + generator: false theme: name: material @@ -58,6 +59,8 @@ theme: - toc.follow - navigation.indexes - navigation.footer + - navigation.tabs + - navigation.tabs.sticky - search.suggest - search.highlight - search.share @@ -84,20 +87,58 @@ theme: name: Switch to system preference markdown_extensions: + # PyMdown Extensions pymdownx.highlight: {} pymdownx.superfences: {} - pymdownx.blocks.admonition: {} pymdownx.blocks.caption: {} + pymdownx.blocks.admonition: # Enables admonitions. + types: + - note + - abstract + - info + - tip + - success + - question + - warning + - failure + - danger + - bug + - example + - quote + pymdownx.blocks.details: # Enables collapsible content. + types: + - {name: details-note, class: note} + - {name: details-abstract, class: abstract} + - {name: details-info, class: info} + - {name: details-tip, class: tip} + - {name: details-success, class: success} + - {name: details-question, class: question} + - {name: details-warning, class: warning} + - {name: details-failure, class: failure} + - {name: details-danger, class: danger} + - {name: details-bug, class: bug} + - {name: details-example, class: example} + - {name: details-quote, class: quote} pymdownx.blocks.tab: alternate_style: true + pymdownx.magiclink: # Among other things, enables GitHub shorthand references. + provider: "github" + user: "beeware" + repo: "toga" + repo_url_shortener: true + repo_url_shorthand: true + normalize_issue_symbols: true pymdownx.snippets: base_path: ["docs"] url_download: true check_paths: true + # Python Markdown Extensions + attr_list: {} + smarty: # Enables easy em and en dashes. + smart_quotes: false toc: permalink: true title: On this page - attr_list: {} plugins: search: {} diff --git a/docs/mkdocs.de.yml b/docs/mkdocs.de.yml index 9afad97..46c133c 100644 --- a/docs/mkdocs.de.yml +++ b/docs/mkdocs.de.yml @@ -8,3 +8,11 @@ theme: extra: translation_type: machine + language_url: de/ + header: + About: Über + Documentation: Dokumentation + Community: Verbund + Contributing: Mithelfen + News: Neuigkeiten + Sponsor: Fördern diff --git a/docs/mkdocs.en.yml b/docs/mkdocs.en.yml index a35a54e..db96ce5 100644 --- a/docs/mkdocs.en.yml +++ b/docs/mkdocs.en.yml @@ -5,3 +5,4 @@ docs_dir: en extra: translation_type: original + header: {} diff --git a/docs/mkdocs.es.yml b/docs/mkdocs.es.yml index 7cf99ce..b910063 100644 --- a/docs/mkdocs.es.yml +++ b/docs/mkdocs.es.yml @@ -8,3 +8,11 @@ theme: extra: translation_type: machine + language_url: es/ + header: + About: Acerca + Documentation: Documentación + Community: Comunidad + Contributing: Contribuir + News: Noticias + Sponsor: Auspiciar diff --git a/docs/mkdocs.fr.yml b/docs/mkdocs.fr.yml index a30a678..f904006 100644 --- a/docs/mkdocs.fr.yml +++ b/docs/mkdocs.fr.yml @@ -8,3 +8,11 @@ theme: extra: translation_type: machine + language_url: fr/ + header: + About: À Propos + Documentation: Documentation + Community: Communauté + Contributing: Contribuer + News: Nouvelles + Sponsor: Parrainer diff --git a/docs/mkdocs.it.yml b/docs/mkdocs.it.yml index 30f937b..f28f10c 100644 --- a/docs/mkdocs.it.yml +++ b/docs/mkdocs.it.yml @@ -8,3 +8,11 @@ theme: extra: translation_type: machine + language_url: it/ + header: + About: Circa + Documentation: Documentazione + Community: Comunità + Contributing: Contribuire + News: Notizie + Sponsor: Sponsorizzare diff --git a/docs/mkdocs.pt.yml b/docs/mkdocs.pt.yml index 2767ace..aa62e8a 100644 --- a/docs/mkdocs.pt.yml +++ b/docs/mkdocs.pt.yml @@ -8,3 +8,11 @@ theme: extra: translation_type: machine + language_url: pt/ + header: + About: Sobre + Documentation: Documentação + Community: Comunidade + Contributing: Contribuir + News: News + Sponsor: Patrocinar diff --git a/docs/mkdocs.zh_CN.yml b/docs/mkdocs.zh_CN.yml index 80ae49a..faf02a8 100644 --- a/docs/mkdocs.zh_CN.yml +++ b/docs/mkdocs.zh_CN.yml @@ -1,6 +1,6 @@ INHERIT: config.yml site_name: BeeWare Tutorial -site_url: https://tutorial.beeware.org/zh_CN +site_url: https://tutorial.beeware.org/zh-cn docs_dir: zh_CN theme: @@ -8,3 +8,11 @@ theme: extra: translation_type: machine + language_url: zh-cn/ + header: + About: 关于 + Documentation: 文档 + Community: 社区 + Contributing: 贡献 + News: 新闻 + Sponsor: 赞助 diff --git a/docs/mkdocs.zh_TW.yml b/docs/mkdocs.zh_TW.yml index a139141..44c78ee 100644 --- a/docs/mkdocs.zh_TW.yml +++ b/docs/mkdocs.zh_TW.yml @@ -1,6 +1,6 @@ INHERIT: config.yml site_name: BeeWare Tutorial -site_url: https://tutorial.beeware.org/zh_TW +site_url: https://tutorial.beeware.org/zh-tw docs_dir: zh_TW theme: @@ -8,3 +8,11 @@ theme: extra: translation_type: machine + language_url: zh-tw/ + header: + About: 關於 + Documentation: 文件 + Community: 社群 + Contributing: 貢獻 + News: 新聞 + Sponsor: 贊助 diff --git a/pyproject.toml b/pyproject.toml index 537d61d..46055bc 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -23,7 +23,9 @@ translate = [ ] docs = [ - "beeware-docs-tools @ git+https://github.com/beeware/beeware-docs-tools", + # TODO: Restore main branch for final. +# "beeware-docs-tools @ git+https://github.com/beeware/beeware-docs-tools", + "beeware-docs-tools @ git+https://github.com/kattni/beeware-docs-tools@tooling/website-mkdocs-migration", ] [tool.rumdl] @@ -33,7 +35,6 @@ exclude = ["CODE_OF_CONDUCT.md"] respect-gitignore = true # Disable rules: -# MD013: Enforces line length # MD014: Forces commands in codeblocks to show output disable = ["MD014",] diff --git a/tox.ini b/tox.ini index 3e716bc..9556473 100644 --- a/tox.ini +++ b/tox.ini @@ -18,7 +18,7 @@ commands: translate : update_machine_translations --soft-fail de es fr it pt zh_CN zh_TW lint : markdown-checker --dir {[docs]docs_dir} --func check_broken_urls lint : pyspelling - live : live_serve_en {posargs} + live : live_serve_en {posargs} --port=8041 all : build_md_translations {posargs} en de es fr it pt zh_CN zh_TW en : build_md_translations {posargs} en de : build_md_translations {posargs} de