diff --git a/doc/source/_themes/starlingxdocs_plus/__init__.py b/doc/source/_themes/starlingxdocs_plus/__init__.py
new file mode 100644
index 000000000..ea977fe89
--- /dev/null
+++ b/doc/source/_themes/starlingxdocs_plus/__init__.py
@@ -0,0 +1,26 @@
+import openstackdocstheme as osdt
+
+def _html_page_context(app, pagename, templatename, context, doctree):
+ context['this_version']=app.config.starlingxdocs_plus_this_version
+ context['other_versions']=app.config.starlingxdocs_plus_other_versions
+ context['bug_project'] = app.config.starlingxdocs_plus_bug_project
+ context['bug_tag'] = app.config.starlingxdocs_plus_bug_tag
+
+def setup(app):
+ app.add_html_theme(
+ 'openstackdocs',
+ osdt.__path__[0] + '/theme/openstackdocs',
+ )
+ app.add_html_theme(
+ 'starlingxdocs',
+ osdt.__path__[0] + '/theme/starlingxdocs',
+ )
+ app.add_config_value('starlingxdocs_plus_this_version','','env')
+ app.add_config_value('starlingxdocs_plus_other_versions', [], 'env')
+ app.add_config_value('starlingxdocs_plus_repo_name','','env')
+ app.add_config_value('starlingxdocs_plus_project','','env')
+ app.add_config_value('starlingxdocs_plus_auto_name', False, 'env')
+ app.add_config_value('starlingxdocs_plus_bug_project','','env')
+ app.add_config_value('starlingxdocs_plus_bug_tag','','env')
+ app.connect('html-page-context', _html_page_context)
+ app.add_css_file("custom.css")
\ No newline at end of file
diff --git a/doc/source/_themes/starlingxdocs_plus/static/custom.css b/doc/source/_themes/starlingxdocs_plus/static/custom.css
new file mode 100644
index 000000000..5dfbe0014
--- /dev/null
+++ b/doc/source/_themes/starlingxdocs_plus/static/custom.css
@@ -0,0 +1,3 @@
+.version-dropdown-content {
+ top: 12px;
+}
\ No newline at end of file
diff --git a/doc/source/_themes/starlingxdocs_plus/theme.conf b/doc/source/_themes/starlingxdocs_plus/theme.conf
new file mode 100644
index 000000000..3bc19c914
--- /dev/null
+++ b/doc/source/_themes/starlingxdocs_plus/theme.conf
@@ -0,0 +1,2 @@
+[theme]
+inherit = starlingxdocs
\ No newline at end of file
diff --git a/doc/source/_themes/starlingxdocs_plus/titlerow.html b/doc/source/_themes/starlingxdocs_plus/titlerow.html
new file mode 100644
index 000000000..538f57b04
--- /dev/null
+++ b/doc/source/_themes/starlingxdocs_plus/titlerow.html
@@ -0,0 +1,33 @@
+
+
+ {%- if theme_sidebar_dropdown == 'os_docs' %}
+
{{ title }}
+ {% else %}
+ StarlingX API Documentation
+ {%- endif %}
+
+
+ {%- block otherversions %}
+ {%- if other_versions %}
+
+ {%- endif %}
+ {%- endblock %}
+ {% if prev %}
+
+ {% endif %}
+ {% if next %}
+
+ {% endif %}
+ {%- if bug_project %}
+
+ {% endif %}
+
+
diff --git a/doc/source/conf.py b/doc/source/conf.py
index 6d209702f..7d2f760b9 100644
--- a/doc/source/conf.py
+++ b/doc/source/conf.py
@@ -14,6 +14,7 @@
#
import os
import sys
+sys.path.insert(0,os.path.abspath('_themes'))
# sys.path.insert(0, os.path.abspath('.'))
@@ -34,7 +35,8 @@ author = 'StarlingX'
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
- 'openstackdocstheme',
+# 'openstackdocstheme',
+ 'starlingxdocs_plus'
]
# Add any paths that contain templates here, relative to this directory.
@@ -65,11 +67,12 @@ exclude_patterns = []
pygments_style = 'native'
# General information about the project.
-openstackdocs_repo_name = 'openstack/stx-docs'
-openstackdocs_project = 'StarlingX'
-openstackdocs_auto_name = False
-openstackdocs_bug_project = 'starlingx'
-openstackdocs_bug_tag = 'stx.docs'
+# Legacy openstackdocstheme variables
+# openstackdocs_repo_name = 'openstack/stx-docs'
+# openstackdocs_project = 'StarlingX'
+# openstackdocs_auto_name = False
+# openstackdocs_bug_project = 'starlingx'
+# openstackdocs_bug_tag = 'stx.docs'
# Common substitution strings such as organization, product
@@ -82,7 +85,8 @@ rst_prolog = open('./shared/strings.txt', 'r').read()
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
-html_theme = 'starlingxdocs'
+html_theme_path = ['_themes']
+html_theme = 'starlingxdocs_plus'
# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
@@ -165,3 +169,15 @@ texinfo_documents = [
author, 'stx-docs', 'One line description of project.',
'Miscellaneous'),
]
+
+# -- Options for starlingxdocs_plus theme output -----------------------------
+# General information about the project.
+
+starlingxdocs_plus_repo_name = 'openstack/stx-docs'
+starlingxdocs_plus_project = 'StarlingX'
+starlingxdocs_plus_auto_name = False
+starlingxdocs_plus_bug_project = 'starlingx'
+starlingxdocs_plus_bug_tag = 'stx.docs'
+starlingxdocs_plus_this_version = "latest"
+# starlingxdocs_plus_other_versions = [("even later","even-later"),("sooner","sooner")]
+starlingxdocs_plus_other_versions = []