mirror of
https://github.com/open-mmlab/mmengine.git
synced 2025-06-03 21:54:44 +08:00
[Docs] Fix cannot show changelog.md
in chinese documents. (#606)
* [Fix] Fix error path of changelog.md in docs/zh_cn/index.rsts * Fix stupid commit * run bash script during build docs * run bash script during build docs * run bash script during build docs * translate notes to 说明 * update auth
This commit is contained in:
parent
bc37c838d4
commit
910778a94e
@ -11,6 +11,7 @@
|
|||||||
# documentation root, use os.path.abspath to make it absolute, like shown here.
|
# documentation root, use os.path.abspath to make it absolute, like shown here.
|
||||||
#
|
#
|
||||||
import os
|
import os
|
||||||
|
import subprocess
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
import pytorch_sphinx_theme
|
import pytorch_sphinx_theme
|
||||||
@ -102,3 +103,11 @@ html_css_files = ['css/readthedocs.css']
|
|||||||
# Ignore >>> when copying code
|
# Ignore >>> when copying code
|
||||||
copybutton_prompt_text = r'>>> |\.\.\. '
|
copybutton_prompt_text = r'>>> |\.\.\. '
|
||||||
copybutton_prompt_is_regexp = True
|
copybutton_prompt_is_regexp = True
|
||||||
|
|
||||||
|
|
||||||
|
def builder_inited_handler(app):
|
||||||
|
subprocess.run(['./cp_origin_docs.sh'])
|
||||||
|
|
||||||
|
|
||||||
|
def setup(app):
|
||||||
|
app.connect('builder-inited', builder_inited_handler)
|
||||||
|
9
docs/zh_cn/cp_origin_docs.sh
Executable file
9
docs/zh_cn/cp_origin_docs.sh
Executable file
@ -0,0 +1,9 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# Copy *.md files from docs/ if it doesn't have a Chinese translation
|
||||||
|
|
||||||
|
for filename in $(find ../en/ -name '*.md' -printf "%P\n");
|
||||||
|
do
|
||||||
|
mkdir -p $(dirname $filename)
|
||||||
|
cp -n ../en/$filename ./$filename
|
||||||
|
done
|
@ -91,7 +91,7 @@
|
|||||||
|
|
||||||
.. toctree::
|
.. toctree::
|
||||||
:maxdepth: 2
|
:maxdepth: 2
|
||||||
:caption: Notes
|
:caption: 说明
|
||||||
|
|
||||||
notes/changelog.md
|
notes/changelog.md
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user