diff --git a/requirements.txt b/requirements.txt index 7bb5a491969c50018e55326f3f0a2d6f76f44e65..17f57b76c24774f70a48e9928fa41ccf43c5d62f 100644 --- a/requirements.txt +++ b/requirements.txt @@ -32,3 +32,4 @@ tornado==6.0.3 urllib3==1.25.3 watchdog==0.9.0 sphinx-sitemap==2.2.0 +sphinx-multiversion==0.2.4 diff --git a/source/conf.py b/source/conf.py index af0d2f8766820edab435021d80221752212b8049..bce57c721b8b58b6f78daea3e7a364c87b0aae4a 100755 --- a/source/conf.py +++ b/source/conf.py @@ -28,7 +28,7 @@ import os # Add any Sphinx extension module names here, as strings. They can be # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # ones. -extensions = ['chinese_search','sphinx.ext.mathjax', 'sphinx_sitemap'] +extensions = ['chinese_search','sphinx.ext.mathjax', 'sphinx_sitemap', 'sphinx_multiversion'] # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates'] @@ -133,3 +133,12 @@ html_js_files = [ html_baseurl = 'http://golang.iswbm.com' html_extra_path = ["robots.txt"] + +html_sidebars = { + '**': [ + 'versioning.html', + ], +} + +smv_latest_version = 'master' +sitemap_url_scheme = "{link}"