Skip to content
Snippets Groups Projects
Unverified Commit 910778a9 authored by Mashiro's avatar Mashiro Committed by GitHub
Browse files

[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
parent bc37c838
No related branches found
No related tags found
No related merge requests found
......@@ -11,6 +11,7 @@
# documentation root, use os.path.abspath to make it absolute, like shown here.
#
import os
import subprocess
import sys
import pytorch_sphinx_theme
......@@ -102,3 +103,11 @@ html_css_files = ['css/readthedocs.css']
# Ignore >>> when copying code
copybutton_prompt_text = r'>>> |\.\.\. '
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)
#!/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::
:maxdepth: 2
:caption: Notes
:caption: 说明
notes/changelog.md
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment