From a140307ca3f7cc5e2fb5195161df85ca005efe57 Mon Sep 17 00:00:00 2001
From: Lucy Cifferello <12953208+elvece@users.noreply.github.com>
Date: Thu, 18 Nov 2021 08:59:18 -0700
Subject: [PATCH] base versioning configuration
---
README.md | 4 ++++
source/_templates/layout.html | 2 +-
source/_templates/versioning.html | 17 +++++++++++-----
source/conf.py | 34 ++++++++++++++++---------------
4 files changed, 35 insertions(+), 22 deletions(-)
diff --git a/README.md b/README.md
index 00b2e14..e7bf97d 100644
--- a/README.md
+++ b/README.md
@@ -58,3 +58,7 @@ To update Sphinx Book Theme:
To deploy theme update:
- Build and publish according to production release process
+
+## Versioning
+- Build for versioning: `sphinx-multiversion source build/html`
+- To view version metadata: `sphinx-multiversion source build/html --dump-metadata`
\ No newline at end of file
diff --git a/source/_templates/layout.html b/source/_templates/layout.html
index 7fc2b2d..3fbeb16 100644
--- a/source/_templates/layout.html
+++ b/source/_templates/layout.html
@@ -11,4 +11,4 @@
-{% endblock %}
+{% endblock %}
\ No newline at end of file
diff --git a/source/_templates/versioning.html b/source/_templates/versioning.html
index ef74ed4..2c7eb3f 100644
--- a/source/_templates/versioning.html
+++ b/source/_templates/versioning.html
@@ -1,8 +1,15 @@
{% if versions %}
-
{{ _('Versions') }}
+{{ _('Branches') }}
-{% endif %}
\ No newline at end of file
+{{ _('Tags') }}
+
+{% endif %}
+*testing versions*
\ No newline at end of file
diff --git a/source/conf.py b/source/conf.py
index ce0946a..2eeef84 100644
--- a/source/conf.py
+++ b/source/conf.py
@@ -34,12 +34,9 @@ extensions = [
templates_path = ['_templates']
# HTML sidebar widgets
-# html_sidebars = {
-# "**": ["versioning.html"],
-# '**': [
-# 'versioning.html',
-# ],
-# }
+html_sidebars = {
+ "**": ["sidebar-logo.html", "search-field.html", "versioning.html", "sbt-sidebar-nav.html", "sbt-sidebar-footer.html"]
+}
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
@@ -47,18 +44,23 @@ templates_path = ['_templates']
exclude_patterns = []
# Multiversion settings
-# smv_tag_whitelist = None
-# smv_branch_whitelist = None
-# smv_prefer_remote_refs = True
+# Whitelist pattern for tags (set to None to ignore all tags)
+smv_tag_whitelist = r'^v\d+\.\d+$' # Include tags like "v2.1"
-# Versions = {
-# "v0.2.x" : "https://github.com/Start9Labs/documentation",
-# "v0.3.x" : "https://github.com/Start9Labs/documentation/tree/docs-updates"
-# }
-smv_tag_whitelist = 'None'
+# Whitelist pattern for branches (set to None to ignore all branches)
+smv_branch_whitelist = r'^.*$'
+
+# Whitelist pattern for remotes (set to None to use local branches only)
+smv_remote_whitelist = r'^(origin)$'
+
+# Pattern for released versions
+smv_released_pattern = r'^tags/.*$'
+
+# Format for versioned output directories inside the build directory
+smv_outputdir_format = 'versions/{ref.name}'
+
+# Determines whether remote or local git branches/tags are preferred if their output dirs conflict
smv_prefer_remote_refs = True
-# smv_branch_whitelist = master
-
# -- Options for HTML output -------------------------------------------------