From be94e5b686880eee6b49c91ff853122717a14411 Mon Sep 17 00:00:00 2001 From: x54-729 <17307130121@fudan.edu.cn> Date: Thu, 19 May 2022 09:04:58 +0000 Subject: [PATCH] =?UTF-8?q?1.=E5=A2=9E=E5=8A=A0=E6=9E=84=E5=BB=BA=E5=A4=9A?= =?UTF-8?q?=E5=88=86=E6=94=AF=E6=96=87=E6=A1=A3=E7=9A=84=E5=91=BD=E4=BB=A4?= =?UTF-8?q?=E5=92=8C=E6=96=87=E4=BB=B6=202.=E9=87=8D=E5=91=BD=E5=90=8DJenk?= =?UTF-8?q?insfile=E4=B8=BA.Jenkinsfile?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Jenkinsfile => .Jenkinsfile | 0 docs/Makefile | 5 ++++- docs/requirements.txt | 3 ++- docs/source/_templates/versions.html | 27 +++++++++++++++++++++++++++ docs/source/conf.py | 11 +++++++++-- 5 files changed, 42 insertions(+), 4 deletions(-) rename Jenkinsfile => .Jenkinsfile (100%) create mode 100644 docs/source/_templates/versions.html diff --git a/Jenkinsfile b/.Jenkinsfile similarity index 100% rename from Jenkinsfile rename to .Jenkinsfile diff --git a/docs/Makefile b/docs/Makefile index d6c4f6b6..fd4035db 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -9,7 +9,7 @@ SPHINXPROJ = fastNLP SPHINXEXCLUDE = ../fastNLP/transformers/* SOURCEDIR = source BUILDDIR = build -PORT = 9000 +PORT = 8000 # Put it first so that "make" without argument is like "make help". help: @@ -30,6 +30,9 @@ web: dev: make delete && make apidoc && make html && make server +versions: + sphinx-multiversion "$(SOURCEDIR)" "$(BUILDDIR)" && cd build && python -m http.server $(PORT) + prod: make apidoc && make html diff --git a/docs/requirements.txt b/docs/requirements.txt index 45450867..91e78913 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -1,3 +1,4 @@ sphinx sphinx_rtd_theme -sphinx_autodoc_typehints \ No newline at end of file +sphinx_autodoc_typehints +sphinx-multiversion \ No newline at end of file diff --git a/docs/source/_templates/versions.html b/docs/source/_templates/versions.html new file mode 100644 index 00000000..476c8d19 --- /dev/null +++ b/docs/source/_templates/versions.html @@ -0,0 +1,27 @@ +{%- if current_version %} +