Skip to content

Commit

Permalink
Add version dropdown to docs
Browse files Browse the repository at this point in the history
  • Loading branch information
danirus committed Nov 26, 2024
1 parent b8c66af commit 3e15a78
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,11 @@
"https://sphinx-colorschemed-images.readthedocs.io/{release}/"
)

version = ".".join(sphinx_colorschemed_images.__version__.split(".")[:2])
release = sphinx_colorschemed_images.__version__
releases = [release,]
releases = [
release,
]

# -- General configuration ---------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
Expand Down Expand Up @@ -65,11 +68,11 @@
"repository_url": "https://github.com/danirus/sphinx-colorschemed-images",
"repository_name": "sphinx-colorschemed-images",

# "current_version": f"v{release}",
# "versions": [
# ("v%s" % item, release_pattern_url.format(release=item))
# for item in releases
# ],
"current_version": f"v{release}",
"versions": [
("v%s" % item, release_pattern_url.format(release=item))
for item in releases
],

"header_links": [
{
Expand Down

0 comments on commit 3e15a78

Please sign in to comment.