diff --git a/.gitignore b/.gitignore
index 0a0dd02414c32ede8d58d2556709827f9a98bf5c..b7dfec34eb31252fcb42b3bab9f70e3a0676ba22 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,4 @@
+deprecated
+*~
pandoc.template
.DS_Store
\ No newline at end of file
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 0d8234b69cb092a25eb884a754600168f9a67f75..cba2de8afb9b5d7561e7cec9df4ff196088d84ac 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -14,3 +14,11 @@
- id: check-symlinks
- id: detect-private-key
- id: end-of-file-fixer
+- repo: local
+ hooks:
+ - id: convert-markdown-into-html
+ name: convert-markdown-into-html
+ description: "Convert README.md into index.html and README.en.md into index.en.html"
+ entry: python pre-commit-hooks/convert_markdown_into_html.py
+ language: system
+ files: \.md$
diff --git a/fit_a_line/README.en.md b/fit_a_line/README.en.md
index 21f457c3730c19ffaa6375fb346981c06b9d008f..29aabdab045feeea895b5c3c1e3bd2840f170310 100644
--- a/fit_a_line/README.en.md
+++ b/fit_a_line/README.en.md
@@ -202,4 +202,4 @@ This chapter introduces *Linear Regression* and how to train and test this model
4. Bishop C M. Pattern recognition[J]. Machine Learning, 2006, 128.
-
本教程 由 PaddlePaddle 创作,采用 知识共享 署名-非商业性使用-相同方式共享 4.0 国际 许可协议进行许可。
+
This tutorial was created and published with [Creative Common License 4.0](http://creativecommons.org/licenses/by-nc-sa/4.0/).
diff --git a/fit_a_line/index.en.html b/fit_a_line/index.en.html
index b2492b2c8d0ab1126ba444acc669102bc02ebdfb..8e3a35f3ace084e62448ebf3d0b82966383f6f3e 100644
--- a/fit_a_line/index.en.html
+++ b/fit_a_line/index.en.html
@@ -1,3 +1,4 @@
+
+
+
+
+
+
+
+
+
+
+
- Please access github home page
+
+
+
+
+
+
+# 深度学习入门
+
+1. 新手入门 [[fit_a_line](fit_a_line/)] [[html](http://book.paddlepaddle.org/fit_a_line)]
+1. 识别数字 [[recognize_digits](recognize_digits/)] [[html](http://book.paddlepaddle.org/recognize_digits)]
+1. 图像分类 [[image_classification](image_classification/)] [[html](http://book.paddlepaddle.org/image_classification)]
+1. 词向量 [[word2vec](word2vec/)] [[html](http://book.paddlepaddle.org/word2vec)]
+1. 情感分析 [[understand_sentiment](understand_sentiment/)] [[html](http://book.paddlepaddle.org/understand_sentiment)]
+1. 语义角色标注 [[label_semantic_roles](label_semantic_roles/)] [[html](http://book.paddlepaddle.org/label_semantic_roles)]
+1. 机器翻译 [[machine_translation](machine_translation/)] [[html](http://book.paddlepaddle.org/machine_translation)]
+1. 个性化推荐 [[recommender_system](recommender_system/)] [[html](http://book.paddlepaddle.org/recommender_system)]
+
+
+
本教程 由
PaddlePaddle 创作,采用
知识共享 署名-非商业性使用-相同方式共享 4.0 国际 许可协议进行许可。
+
+
+
+
+
diff --git a/label_semantic_roles/index.en.html b/label_semantic_roles/index.en.html
index a3fc66370f6ac872d38f5faf798414dd86987e7e..84c22731bc46adde13043a1fc22f751e9649d597 100644
--- a/label_semantic_roles/index.en.html
+++ b/label_semantic_roles/index.en.html
@@ -1,3 +1,4 @@
+
-EOF
+"""
+
+
+def convert_markdown_into_html(argv=None):
+ parser = argparse.ArgumentParser()
+ parser.add_argument('filenames', nargs='*', help='Filenames to fix')
+ args = parser.parse_args(argv)
+
+ retv = 0
+
+ for filename in args.filenames:
+ with open(
+ re.sub(r"README", "index", re.sub(r"\.md$", ".html", filename)),
+ "w") as output:
+ output.write(HEAD)
+ with open(filename) as input:
+ for line in input:
+ output.write(line)
+ output.write(TAIL)
+
+ return retv
+
+
+if __name__ == '__main__':
+ sys.exit(convert_markdown_into_html())
diff --git a/query_relationship/index.html b/query_relationship/index.html
index bd5f85aff99e291b01dc091f7a3d4ac622bce4a6..de7844e1e48f745f1268b11746d4a0ad65dd824c 100644
--- a/query_relationship/index.html
+++ b/query_relationship/index.html
@@ -1,3 +1,4 @@
+