From 05980cc1dcd9e14469f491cc76cacd6e31a20da1 Mon Sep 17 00:00:00 2001 From: Dongdong Tian Date: Thu, 13 Oct 2022 00:00:07 +0800 Subject: [PATCH 1/2] Set different html_baseurl for stable and dev versions --- doc/conf.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/conf.py b/doc/conf.py index 0d57658079c..cb6b7d024bf 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -137,8 +137,10 @@ copyright = f"2017-{year}, The PyGMT Developers" # pylint: disable=redefined-builtin if len(__version__.split("+")) > 1 or __version__ == "unknown": version = "dev" + html_baseurl = "https://pygmt.org/dev/" else: version = __version__ + html_baseurl = "https://pygmt.org/latest/" release = __version__ # These enable substitutions using |variable| in the rst files @@ -146,7 +148,6 @@ .. |year| replace:: {year} """ -html_baseurl = "https://pygmt.org/latest/" html_last_updated_fmt = "%b %d, %Y" html_title = "PyGMT" html_short_title = "PyGMT" From 38298e272d6e7394d8f8c7b64570984b8d3a7615 Mon Sep 17 00:00:00 2001 From: Dongdong Tian Date: Tue, 18 Oct 2022 13:24:58 +0800 Subject: [PATCH 2/2] Update doc/conf.py Co-authored-by: Will Schlitzer --- doc/conf.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/doc/conf.py b/doc/conf.py index cb6b7d024bf..ad10c1cd413 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -137,9 +137,11 @@ 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__