Skip to content

Commit 20f44af

Browse files
doc: Set different html_baseurl for stable and dev versions (#2158)
Co-authored-by: Will Schlitzer <[email protected]>
1 parent 5a967f9 commit 20f44af

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

doc/conf.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,16 +137,19 @@
137137
copyright = f"2017-{year}, The PyGMT Developers" # pylint: disable=redefined-builtin
138138
if len(__version__.split("+")) > 1 or __version__ == "unknown":
139139
version = "dev"
140+
# Set base_url for stable version
141+
html_baseurl = "https://pygmt.org/dev/"
140142
else:
141143
version = __version__
144+
# Set base_url for dev version
145+
html_baseurl = "https://pygmt.org/latest/"
142146
release = __version__
143147

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

149-
html_baseurl = "https://pygmt.org/latest/"
150153
html_last_updated_fmt = "%b %d, %Y"
151154
html_title = "PyGMT"
152155
html_short_title = "PyGMT"

0 commit comments

Comments
 (0)