[DOCS] Added versioning (#453)
This commit is contained in:
39
docs/conf.py
39
docs/conf.py
@@ -66,25 +66,38 @@ def setup(app):
|
||||
import sys
|
||||
import os
|
||||
sys.path.insert(0, os.path.abspath('../python/'))
|
||||
extensions = ['sphinx.ext.autodoc', 'sphinx.ext.intersphinx', 'sphinx.ext.autosummary', 'sphinx.ext.coverage', 'sphinx.ext.napoleon']
|
||||
extensions = ['sphinx.ext.autodoc', 'sphinx.ext.intersphinx', 'sphinx.ext.autosummary', 'sphinx.ext.coverage', 'sphinx.ext.napoleon', 'sphinx_multiversion']
|
||||
autosummary_generate = True
|
||||
|
||||
# versioning config
|
||||
smv_tag_whitelist = r'^(v1.1.1)$'
|
||||
smv_branch_whitelist = r'^master$'
|
||||
smv_remote_whitelist = None
|
||||
smv_released_pattern = r'^tags/.*$'
|
||||
smv_outputdir_format = '{ref.name}'
|
||||
smv_prefer_remote_refs = False
|
||||
|
||||
# Sphinx gallery
|
||||
extensions += ['sphinx_gallery.gen_gallery']
|
||||
from sphinx_gallery.sorting import FileNameSortKey
|
||||
sphinx_gallery_conf = {
|
||||
'examples_dirs': '../python/tutorials/',
|
||||
'gallery_dirs': 'getting-started/tutorials',
|
||||
'filename_pattern': '',
|
||||
'ignore_pattern': r'__init__\.py',
|
||||
'within_subsection_order': FileNameSortKey,
|
||||
'reference_url': {
|
||||
'sphinx_gallery': None,
|
||||
}
|
||||
}
|
||||
# extensions += ['sphinx_gallery.gen_gallery']
|
||||
# from sphinx_gallery.sorting import FileNameSortKey
|
||||
# sphinx_gallery_conf = {
|
||||
# 'examples_dirs': '../python/tutorials/',
|
||||
# 'gallery_dirs': 'getting-started/tutorials',
|
||||
# 'filename_pattern': '',
|
||||
# 'ignore_pattern': r'__init__\.py',
|
||||
# 'within_subsection_order': FileNameSortKey,
|
||||
# 'reference_url': {
|
||||
# 'sphinx_gallery': None,
|
||||
# }
|
||||
# }
|
||||
|
||||
# Add any paths that contain templates here, relative to this directory.
|
||||
templates_path = ['_templates']
|
||||
html_sidebars = {
|
||||
'**': [
|
||||
'_templates/versions.html',
|
||||
],
|
||||
}
|
||||
|
||||
# The suffix(es) of source filenames.
|
||||
# You can specify multiple suffix as a list of string:
|
||||
|
Reference in New Issue
Block a user