diff --git a/publishconf.py b/publishconf.py index 9e297520..16051b55 100644 --- a/publishconf.py +++ b/publishconf.py @@ -10,8 +10,9 @@ from pelicanconf import * -if "READTHEDOCS" in os.environ: - # Make all URLs "domainless" in the RTD preview +if os.environ.get("READTHEDOCS_VERSION_TYPE") == "external": + # Make all URLs "domainless" in the RTD PR preview + # https://docs.readthedocs.io/en/stable/reference/environment-variables.html SITEURL = "" else: # This setting is needed to make the RSS/Atom feeds generate correctly