From f39bc235a71f62a9411ec3494d728ba650dd4553 Mon Sep 17 00:00:00 2001 From: qingqing01 Date: Mon, 16 Dec 2019 21:22:15 +0800 Subject: [PATCH] Add mkdocs and remove _doc in some filename. (#4) * Add mkdocs.yml and rename some docs * Update hooks --- .pre-commit-config.yaml | 7 ++++++ ...ization_api_doc.md => quantization_api.md} | 0 .../{search_space_doc.md => search_space.md} | 0 ...ler_api_doc.md => single_distiller_api.md} | 0 docs/mkdocs.yml | 25 +++++++++++++++++++ docs/requirements.txt | 4 +++ 6 files changed, 36 insertions(+) rename docs/docs/api/{quantization_api_doc.md => quantization_api.md} (100%) rename docs/docs/api/{search_space_doc.md => search_space.md} (100%) rename docs/docs/api/{single_distiller_api_doc.md => single_distiller_api.md} (100%) create mode 100644 docs/mkdocs.yml create mode 100644 docs/requirements.txt diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 73b57ff2db500..9d849f12a1bfe 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -4,6 +4,10 @@ repos: hooks: - id: remove-crlf files: .∗ + - id: forbid-tabs + files: \.(md|yml)$ + - id: remove-tabs + files: \.(md|yml)$ - repo: https://github.com/PaddlePaddle/mirrors-yapf.git sha: 0d79c0c469bab64f7229c9aca2b1186ef47f0e37 hooks: @@ -18,6 +22,9 @@ repos: - id: detect-private-key files: .∗ - id: end-of-file-fixer + files: \.(md|yml)$ + - id: trailing-whitespace + files: \.(md|yml)$ - repo: local hooks: - id: pylint-doc-string diff --git a/docs/docs/api/quantization_api_doc.md b/docs/docs/api/quantization_api.md similarity index 100% rename from docs/docs/api/quantization_api_doc.md rename to docs/docs/api/quantization_api.md diff --git a/docs/docs/api/search_space_doc.md b/docs/docs/api/search_space.md similarity index 100% rename from docs/docs/api/search_space_doc.md rename to docs/docs/api/search_space.md diff --git a/docs/docs/api/single_distiller_api_doc.md b/docs/docs/api/single_distiller_api.md similarity index 100% rename from docs/docs/api/single_distiller_api_doc.md rename to docs/docs/api/single_distiller_api.md diff --git a/docs/mkdocs.yml b/docs/mkdocs.yml new file mode 100644 index 0000000000000..63cdd3c5ad568 --- /dev/null +++ b/docs/mkdocs.yml @@ -0,0 +1,25 @@ +site_name: PaddleSlim Docs +nav: +- Home: index.md +- 教程: + - 离线量化: tutorials/quant_post_demo.md + - 量化训练: tutorials/quant_aware_demo.md + - Embedding量化: tutorials/quant_embedding_demo.md + - SA搜索: tutorials/nas_demo.md +- API: + - 量化: api/quantization_api_doc.md + - 剪枝: api/prune_api.md + - 敏感度分析: api/analysis_api.md + - 蒸馏: api/single_distiller_api_doc.md + - SA搜索: api/nas_api.md + - 搜索空间: api/search_space_doc.md + +theme: readthedocs + +markdown_extensions: + - pymdownx.arithmatex + - admonition + - codehilite +extra_javascript: + - mathjax-config.js + - MathJax.js?config=TeX-AMS-MML_HTMLorMML diff --git a/docs/requirements.txt b/docs/requirements.txt new file mode 100644 index 0000000000000..aa4ce367e579b --- /dev/null +++ b/docs/requirements.txt @@ -0,0 +1,4 @@ +mkdocs +markdown +python-markdown-math +pymdown-extensions