Skip to content

Commit 4e6f2eb

Browse files
authored
[Docs] Use Chinese menu (open-mmlab#880)
* Use Chinese menu * replace \ with /
1 parent 4d8229c commit 4e6f2eb

File tree

2 files changed

+33
-7
lines changed

2 files changed

+33
-7
lines changed

docs/conf.py

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,10 @@ def get_version():
5050
'matplotlib', 'pycocotools', 'mmseg.version', 'mmcv.ops'
5151
]
5252

53+
# Ignore >>> when copying code
54+
copybutton_prompt_text = r'>>> |\.\.\. '
55+
copybutton_prompt_is_regexp = True
56+
5357
# Add any paths that contain templates here, relative to this directory.
5458
templates_path = ['_templates']
5559

@@ -78,7 +82,8 @@ def get_version():
7882
html_theme = 'pytorch_sphinx_theme'
7983
html_theme_path = [pytorch_sphinx_theme.get_html_theme_path()]
8084
html_theme_options = {
81-
# 'logo_url': 'https://mmsegmentation.readthedocs.io/en/latest/',
85+
'logo_url':
86+
'https://mmsegmentation.readthedocs.io/en/latest/',
8287
'menu': [
8388
{
8489
'name':
@@ -156,6 +161,14 @@ def get_version():
156161
'name': 'GitHub',
157162
'url': 'https://github.com/open-mmlab/'
158163
},
164+
{
165+
'name': 'Twitter',
166+
'url': 'https://twitter.com/OpenMMLab'
167+
},
168+
{
169+
'name': 'Zhihu',
170+
'url': 'https://zhihu.com/people/openmmlab'
171+
},
159172
]
160173
},
161174
]

docs_zh-CN/conf.py

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,10 @@ def get_version():
5050
'matplotlib', 'pycocotools', 'mmseg.version', 'mmcv.ops'
5151
]
5252

53+
# Ignore >>> when copying code
54+
copybutton_prompt_text = r'>>> |\.\.\. '
55+
copybutton_prompt_is_regexp = True
56+
5357
# Add any paths that contain templates here, relative to this directory.
5458
templates_path = ['_templates']
5559

@@ -78,11 +82,12 @@ def get_version():
7882
html_theme = 'pytorch_sphinx_theme'
7983
html_theme_path = [pytorch_sphinx_theme.get_html_theme_path()]
8084
html_theme_options = {
81-
# 'logo_url': 'https://mmsegmentation.readthedocs.io/en/latest/',
85+
'logo_url':
86+
'https://mmsegmentation.readthedocs.io/zh-CN/latest/',
8287
'menu': [
8388
{
8489
'name':
85-
'Tutorial',
90+
'教程',
8691
'url':
8792
'https://github.com/open-mmlab/mmsegmentation/blob/master/'
8893
'demo/MMSegmentation_Tutorial.ipynb'
@@ -93,18 +98,18 @@ def get_version():
9398
},
9499
{
95100
'name':
96-
'Upstream',
101+
'上游库',
97102
'children': [
98103
{
99104
'name': 'MMCV',
100105
'url': 'https://github.com/open-mmlab/mmcv',
101-
'description': 'Foundational library for computer vision'
106+
'description': '基础视觉库'
102107
},
103108
]
104109
},
105110
{
106111
'name':
107-
'Projects',
112+
'算法库',
108113
'children': [
109114
{
110115
'name': 'MMAction2',
@@ -149,13 +154,21 @@ def get_version():
149154
'OpenMMLab',
150155
'children': [
151156
{
152-
'name': 'Homepage',
157+
'name': '官网',
153158
'url': 'https://openmmlab.com/'
154159
},
155160
{
156161
'name': 'GitHub',
157162
'url': 'https://github.com/open-mmlab/'
158163
},
164+
{
165+
'name': '推特',
166+
'url': 'https://twitter.com/OpenMMLab'
167+
},
168+
{
169+
'name': '知乎',
170+
'url': 'https://zhihu.com/people/openmmlab'
171+
},
159172
]
160173
},
161174
]

0 commit comments

Comments
 (0)