[Docs] Configure Myst-parser to parse anchor tag (#164)

pull/173/head
pppppM 2022-05-31 16:22:29 +08:00 committed by GitHub
parent b8daedf544
commit 71a196490b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 8 deletions

View File

@ -46,7 +46,8 @@ extensions = [
]
autodoc_mock_imports = [
'matplotlib', 'pycocotools', 'terminaltables', 'mmdet.version', 'mmcv.ops'
'matplotlib', 'pycocotools', 'terminaltables', 'mmrazor.version',
'mmcv.ops'
]
# Add any paths that contain templates here, relative to this directory.
@ -135,3 +136,7 @@ language = 'en'
# Ignore >>> when copying code
copybutton_prompt_text = r'>>> |\.\.\. '
copybutton_prompt_is_regexp = True
# Enable ::: for my_st
myst_enable_extensions = ['colon_fence']
myst_heading_anchors = 4

View File

@ -41,16 +41,13 @@ release = get_version()
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
'sphinx.ext.autodoc',
'sphinx.ext.napoleon',
'sphinx.ext.viewcode',
'recommonmark',
'sphinx_markdown_tables',
'sphinx_copybutton',
'sphinx.ext.autodoc', 'sphinx.ext.napoleon', 'sphinx.ext.viewcode',
'sphinx_markdown_tables', 'sphinx_copybutton', 'myst_parser'
]
autodoc_mock_imports = [
'matplotlib', 'pycocotools', 'terminaltables', 'mmdet.version', 'mmcv.ops'
'matplotlib', 'pycocotools', 'terminaltables', 'mmrazor.version',
'mmcv.ops'
]
# Add any paths that contain templates here, relative to this directory.
@ -127,3 +124,7 @@ language = 'zh_CN'
# Ignore >>> when copying code
copybutton_prompt_text = r'>>> |\.\.\. '
copybutton_prompt_is_regexp = True
# Enable ::: for my_st
myst_enable_extensions = ['colon_fence']
myst_heading_anchors = 4