Skip to content

doc: Set different html_baseurl for stable and dev versions #2158

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Oct 20, 2022
Merged
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
5 changes: 4 additions & 1 deletion doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,16 +137,19 @@
copyright = f"2017-{year}, The PyGMT Developers" # pylint: disable=redefined-builtin
if len(__version__.split("+")) > 1 or __version__ == "unknown":
version = "dev"
# Set base_url for stable version
html_baseurl = "https://pygmt.org/dev/"
else:
version = __version__
# Set base_url for dev version
html_baseurl = "https://pygmt.org/latest/"
release = __version__

# These enable substitutions using |variable| in the rst files
rst_epilog = f"""
.. |year| replace:: {year}
"""

html_baseurl = "https://pygmt.org/latest/"
html_last_updated_fmt = "%b %d, %Y"
html_title = "PyGMT"
html_short_title = "PyGMT"
Expand Down