diff --git a/pelicanconf.py b/pelicanconf.py index a8718cf7..cadf5591 100644 --- a/pelicanconf.py +++ b/pelicanconf.py @@ -1,11 +1,19 @@ """Read the Docs website Pelican configuration.""" +import os AUTHOR = 'Read the Docs, Inc' SITENAME = 'Read the Docs' -SITEURL = '' RELATIVE_URLS = True +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 + SITEURL = "https://https://about.readthedocs.com" + TIMEZONE = 'US/Pacific' DEFAULT_LANG = 'en' DEFAULT_DATE_FORMAT = '%b %-d, %Y' @@ -38,8 +46,8 @@ # Feed (RSS/Atom) settings FEED_DOMAIN = SITEURL FEED_ATOM = "feeds/atom.xml" -FEED_RSS = "feeds/feed.rss" FEED_MAX_ITEMS = 1 +FEED_RSS = None # No rss FEED_ALL_ATOM = None # No translation TRANSLATION_FEED_ATOM = None # No translation AUTHOR_FEED_ATOM = None # No per author feed diff --git a/readthedocs_theme/templates/index.html b/readthedocs_theme/templates/index.html index bb438f94..b4100f39 100644 --- a/readthedocs_theme/templates/index.html +++ b/readthedocs_theme/templates/index.html @@ -77,7 +77,7 @@