Skip to content

Commit

Permalink
[Docs] Use Chinese menu (#880)
Browse files Browse the repository at this point in the history
* Use Chinese menu

* replace \ with /
  • Loading branch information
Junjun2016 committed Sep 18, 2021
1 parent 4d8229c commit 4e6f2eb
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 7 deletions.
15 changes: 14 additions & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ def get_version():
'matplotlib', 'pycocotools', 'mmseg.version', 'mmcv.ops'
]

# Ignore >>> when copying code
copybutton_prompt_text = r'>>> |\.\.\. '
copybutton_prompt_is_regexp = True

# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']

Expand Down Expand Up @@ -78,7 +82,8 @@ def get_version():
html_theme = 'pytorch_sphinx_theme'
html_theme_path = [pytorch_sphinx_theme.get_html_theme_path()]
html_theme_options = {
# 'logo_url': 'https://mmsegmentation.readthedocs.io/en/latest/',
'logo_url':
'https://mmsegmentation.readthedocs.io/en/latest/',
'menu': [
{
'name':
Expand Down Expand Up @@ -156,6 +161,14 @@ def get_version():
'name': 'GitHub',
'url': 'https://github.com/open-mmlab/'
},
{
'name': 'Twitter',
'url': 'https://twitter.com/OpenMMLab'
},
{
'name': 'Zhihu',
'url': 'https://zhihu.com/people/openmmlab'
},
]
},
]
Expand Down
25 changes: 19 additions & 6 deletions docs_zh-CN/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ def get_version():
'matplotlib', 'pycocotools', 'mmseg.version', 'mmcv.ops'
]

# Ignore >>> when copying code
copybutton_prompt_text = r'>>> |\.\.\. '
copybutton_prompt_is_regexp = True

# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']

Expand Down Expand Up @@ -78,11 +82,12 @@ def get_version():
html_theme = 'pytorch_sphinx_theme'
html_theme_path = [pytorch_sphinx_theme.get_html_theme_path()]
html_theme_options = {
# 'logo_url': 'https://mmsegmentation.readthedocs.io/en/latest/',
'logo_url':
'https://mmsegmentation.readthedocs.io/zh-CN/latest/',
'menu': [
{
'name':
'Tutorial',
'教程',
'url':
'https://github.com/open-mmlab/mmsegmentation/blob/master/'
'demo/MMSegmentation_Tutorial.ipynb'
Expand All @@ -93,18 +98,18 @@ def get_version():
},
{
'name':
'Upstream',
'上游库',
'children': [
{
'name': 'MMCV',
'url': 'https://github.com/open-mmlab/mmcv',
'description': 'Foundational library for computer vision'
'description': '基础视觉库'
},
]
},
{
'name':
'Projects',
'算法库',
'children': [
{
'name': 'MMAction2',
Expand Down Expand Up @@ -149,13 +154,21 @@ def get_version():
'OpenMMLab',
'children': [
{
'name': 'Homepage',
'name': '官网',
'url': 'https://openmmlab.com/'
},
{
'name': 'GitHub',
'url': 'https://github.com/open-mmlab/'
},
{
'name': '推特',
'url': 'https://twitter.com/OpenMMLab'
},
{
'name': '知乎',
'url': 'https://zhihu.com/people/openmmlab'
},
]
},
]
Expand Down

0 comments on commit 4e6f2eb

Please sign in to comment.