Skip to content
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

Don't use relative URLs when deploying #263

Merged
merged 1 commit into from
Feb 19, 2024
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
18 changes: 9 additions & 9 deletions pelicanconf.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@

AUTHOR = 'Read the Docs, Inc'
SITENAME = 'Read the Docs'
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://about.readthedocs.com"

# Use relavitve URLs for local development only.
if not os.environ.get("READTHEDOCS"):
RELATIVE_URLS = True

# Use the correct domain for the site URL (canonical or PR preview),
# this setting is needed to make the RSS/Atom feeds generate correctly
# https://docs.readthedocs.io/en/stable/reference/environment-variables.html.
SITEURL = os.environ.get("READTHEDOCS_CANONICAL_URL", "")

TIMEZONE = 'US/Pacific'
DEFAULT_LANG = 'en'
Expand Down
Loading