Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Docs] Add global notes and the version switcher menu #573

Merged
merged 2 commits into from Nov 10, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
33 changes: 31 additions & 2 deletions docs/en/conf.py
Expand Up @@ -21,7 +21,7 @@
# -- Project information -----------------------------------------------------

project = 'MMSelfSup'
copyright = '2020-2021, OpenMMLab'
copyright = '2020-2030, OpenMMLab'
author = 'MMSelfSup Authors'

# The full version, including alpha/beta/rc tags
Expand Down Expand Up @@ -77,8 +77,37 @@ def get_version():
'name': 'GitHub',
'url': 'https://github.com/open-mmlab/mmselfsup'
},
{
'name':
'Version',
'children': [
{
'name': 'MMSelfSup 0.x',
'url': 'https://mmselfsup.readthedocs.io/en/latest/',
'description': 'docs at main branch'
},
{
'name': 'MMSelfSup 1.x',
'url': 'https://mmselfsup.readthedocs.io/en/dev-1.x/',
'description': 'docs at 1.x branch'
},
],
'active':
True,
},
],
'menu_lang': 'en'
'menu_lang':
'en',
'header_note': {
'content':
'You are reading the documentation for MMSelfSup 0.x, which '
'will soon be deprecated by the end of 2022. We recommend you upgrade '
'to MMSelfSup 1.0.0rc versions to enjoy fruitful new features and '
'better performance brought by OpenMMLab 2.0. Check out the '
'<a href="https://github.com/open-mmlab/mmselfsup/releases">changelog</a>, ' # noqa
'<a href="https://github.com/open-mmlab/mmselfsup/tree/1.x">code</a> ' # noqa
'and <a href="https://mmselfsup.readthedocs.io/en/dev-1.x/">documentation</a> of MMSelfSup 1.0.0rc for more details.', # noqa
}
}

# Add any paths that contain custom static files (such as style sheets) here,
Expand Down
32 changes: 31 additions & 1 deletion docs/zh_cn/conf.py
Expand Up @@ -77,8 +77,38 @@ def get_version():
'name': 'GitHub',
'url': 'https://github.com/open-mmlab/mmselfsup'
},
{
'name':
'版本',
'children': [
{
'name': 'MMSelfSup 0.x',
'url': 'https://mmselfsup.readthedocs.io/zh_CN/latest/',
'description': 'main 分支文档'
},
{
'name': 'MMSelfSup 1.x',
'url': 'https://mmselfsup.readthedocs.io/zh_CN/dev-1.x/',
'description': '1.x 分支文档'
},
],
'active':
True,
},
],
'menu_lang': 'cn',
'menu_lang':
'cn',
'header_note': {
'title':
'注意',
'content':
'您正在阅读 MMSelfSup 0.x 版本的文档,而 MMSelfSup 0.x 版本将会在 2022 年末 '
'开始逐步停止维护。我们建议您及时升级到 MMSelfSup 1.0.0rc 版本,享受由 '
'OpenMMLab 2.0 带来的更多新特性和更佳的性能表现。阅读 MMSelfSup 1.0.0rc 的 '
'<a href="https://github.com/open-mmlab/mmselfsup/releases">发版日志</a>, ' # noqa
'<a href="https://github.com/open-mmlab/mmselfsup/tree/1.x">代码</a> ' # noqa
'和 <a href="https://mmselfsup.readthedocs.io/en/dev-1.x/">文档</a> 获取更多信息。', # noqa
}
}

# Add any paths that contain custom static files (such as style sheets) here,
Expand Down
4 changes: 1 addition & 3 deletions docs/zh_cn/index.rst
Expand Up @@ -3,11 +3,9 @@
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.

Welcome to MMSelfSup's documentation!
欢迎来到 MMSelfSup 的中文文档!
=====================================

中文文档在持续翻译中,敬请期待,同时我们也鼓励社区开发者们参与到翻译中来

.. toctree::
:maxdepth: 1
:caption: 开始你的第一步
Expand Down