Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Add sphinx-multiversion for multi-version documentation
Integrates sphinx-multiversion to support versioned documentation. Configures tag, branch, and remote filters, and marks specific tags as released. Updates HTML titles to include the documentation version for clarity.
  • Loading branch information
Leguark committed May 9, 2025
commit 632fe3e4703373f5c87dc4a0b437c6f00c45dd9a
18 changes: 18 additions & 0 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,3 +225,21 @@
message='Matplotlib is currently using agg, which is a'
' non-GUI backend, so cannot show the figure.')
# endregion

extensions.append("sphinx_multiversion")

# Optional: Control which branches/tags are included
# Match exactly these two tags
smv_tag_whitelist = r'^2025\.1\.0rc0$|^2024\.2\.0\.2$'

# Match only the 'main' branch
smv_branch_whitelist = r'^main$'

# Optional: only use the origin remote
smv_remote_whitelist = r'^origin$'

# Mark tagged versions as "released"
smv_released_pattern = r'^2025\.1\.0rc0$|^2024\.2\.0\.2$'

# Optional: Add version to the HTML title
html_title = f"GemPy Documentation ({version})"
1 change: 1 addition & 0 deletions requirements/docs_requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ sphinx
sphinx-gallery
sphinx_design
sphinx_automodapi
sphinx-multiversion
liquid-earth-sdk
wellpathpy

Expand Down