Skip to content

Commit

Permalink
feat: support i18n config
Browse files Browse the repository at this point in the history
Signed-off-by: GitHub <[email protected]>
  • Loading branch information
samzong authored Dec 17, 2024
1 parent 9357757 commit c6a531a
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 48 deletions.
26 changes: 13 additions & 13 deletions docs/zh/mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,17 +87,17 @@ theme:

# Plugins
plugins:
- search:
separator: '[\\s\\u200b\\-]'
- swagger-ui-tag
search:
separator: '[\\s\\u200b\\-]'
swagger-ui-tag:
# - mermaid2

- minify:
minify_html: true
minify_js: true
minify_css: true
htmlmin_opts:
remove_comments: true
minify:
minify_html: true
minify_js: true
minify_css: true
htmlmin_opts:
remove_comments: true

# - redirects:
# redirect_maps:
Expand All @@ -113,10 +113,10 @@ extra:
type: Discussions

# switch language
alternate:
- link: /
name: 简体中文
lang: zh
# alternate:
# - link: /
# name: 简体中文
# lang: zh
# - link: /en/
# name: English
# lang: en
Expand Down
17 changes: 17 additions & 0 deletions docs/zh/navigation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -322,3 +322,20 @@ nav:
- 云知声: open/pioneers/unisound.md
- 字节跳动: open/pioneers/bytedance.md
- 联系我们: contact/index.md

# i18n
plugins:
i18n:
docs_structure: folder
reconfigure_material: true
reconfigure_search: true
languages:
- locale: zh
name: 中文
default: true
build: true
- locale: en
name: English
build: true
nav_translations:
首页: Home
40 changes: 5 additions & 35 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,35 +1,5 @@
Babel==2.14.0
beautifulsoup4==4.12.3
certifi==2024.2.2
charset-normalizer==3.3.2
click==8.1.7
colorama==0.4.6
csscompressor==0.9.5
ghp-import==2.1.0
htmlmin2==0.1.13
idna==3.6
Jinja2==3.1.3
jsmin==3.0.1
Markdown==3.5.2
MarkupSafe==2.1.5
mergedeep==1.3.4
mkdocs==1.5.3
mkdocs-material==9.5.13
mkdocs-material-extensions==1.3.1
mkdocs-minify-plugin==0.8.0
mkdocs-swagger-ui-tag==0.6.8
packaging==23.2
paginate==0.5.6
pathspec==0.12.1
platformdirs==4.2.0
Pygments==2.17.2
pymdown-extensions==10.7.1
python-dateutil==2.9.0.post0
PyYAML==6.0.1
pyyaml_env_tag==0.1
regex==2023.12.25
requests==2.31.0
six==1.16.0
soupsieve==2.5
urllib3==2.2.1
watchdog==4.0.0
mkdocs-material
mkdocs-material-extensions
mkdocs-minify-plugin
mkdocs-swagger-ui-tag
mkdocs-static-i18n
1 change: 1 addition & 0 deletions scripts/run_netlify.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ pip install mkdocs-material \
mkdocs-redirects \
mkdocs-print-site-plugin \
mkdocs-swagger-ui-tag \
mkdocs-static-i18n \
pyyaml

# build the site
Expand Down

0 comments on commit c6a531a

Please sign in to comment.