From b6d543a35502d7ad2dc8122ccac1c01ab4ac70f1 Mon Sep 17 00:00:00 2001 From: Don Naro Date: Tue, 5 Mar 2024 09:29:45 +0000 Subject: [PATCH] issue #426 update site url in nikola conf (#438) * Add a dev configuration file that sets the site url to the readthedocs location. This ensures that the production url does not leak into the dev site. * Update readthedocs configuration to use the dev conf file. --- .readthedocs.yaml | 2 +- conf.py | 2 +- dev.conf.py | 2 ++ 3 files changed, 4 insertions(+), 2 deletions(-) create mode 100644 dev.conf.py diff --git a/.readthedocs.yaml b/.readthedocs.yaml index 79d38982..ba332ca6 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -12,7 +12,7 @@ build: commands: - python -m pip install --upgrade --no-cache-dir pip setuptools - python -m pip install --upgrade -r ./requirements.in -c ./requirements.txt - - nikola build + - nikola build --conf=dev.conf.py - mkdir -p _readthedocs/html/ - cp -r output/* _readthedocs/html/ - rm _readthedocs/html/robots.txt diff --git a/conf.py b/conf.py index cf99e764..44f0ee44 100644 --- a/conf.py +++ b/conf.py @@ -20,7 +20,7 @@ BLOG_TITLE = "Ansible Community" # (translatable) # This is the main URL for your site. It will be used # in a prominent link. Don't forget the protocol (http/https)! -SITE_URL = "https://ansible-community-website.readthedocs.io/" +SITE_URL = "https://ansible.com/" # This is the URL where Nikola's output will be deployed. # If not set, defaults to SITE_URL # BASE_URL = "https://ansible.community/" diff --git a/dev.conf.py b/dev.conf.py new file mode 100644 index 00000000..d84738b7 --- /dev/null +++ b/dev.conf.py @@ -0,0 +1,2 @@ +from conf import * +SITE_URL = "https://ansible-community-website.readthedocs.io/"