File tree Expand file tree Collapse file tree 3 files changed +25
-9
lines changed Expand file tree Collapse file tree 3 files changed +25
-9
lines changed Original file line number Diff line number Diff line change @@ -71,8 +71,8 @@ To set up the PushPreview workflow in your MkDocs project:
7171
7272 ` ` ` yaml
7373 - uses: actions/setup-python@v2
74- with:
75- python-version: 3.8 # Adjust the Python version as needed for your project
74+ with:
75+ python-version: 3.8 # Adjust the Python version as needed for your project
7676 ` ` `
7777
78781. Modify the **Build site step** to align with your MkDocs build process. For example :
Original file line number Diff line number Diff line change @@ -71,8 +71,8 @@ To set up the PushPreview workflow in your Pelican project:
7171
7272 ` ` ` yaml
7373 - uses: actions/setup-python@v2
74- with:
75- python-version: 3.8 # Adjust the Python version as needed for your project
74+ with:
75+ python-version: 3.8 # Adjust the Python version as needed for your project
7676 ` ` `
7777
78781. Modify the **Build site step** to align with your Pelican build process. For example :
Original file line number Diff line number Diff line change @@ -71,8 +71,8 @@ To set up the PushPreview workflow in your Sphinx project:
7171
7272 ` ` ` yaml
7373 - uses: actions/setup-python@v2
74- with:
75- python-version: 3.8 # Adjust the Python version as needed for your project
74+ with:
75+ python-version: 3.8 # Adjust the Python version as needed for your project
7676 ` ` `
7777
78781. Modify the **Build site step** to align with your Sphinx build process. For example :
@@ -97,13 +97,29 @@ To set up the PushPreview workflow in your Sphinx project:
9797 pushpreview-token: ${{ secrets.PUSHPREVIEW_TOKEN }}
9898 ` ` `
9999
100- 1. Save your changes and push the updated `pushpreview.yml` file to your repository.
101-
102100# # 2. Configure the GitHub secret
103101
104102<GitHubSecret />
105103
106- # # 3. Verify the installation
104+ # # 3. Edit Sphinx configuration
105+
106+ To ensure your Sphinx site correctly supports preview builds, you'll need to adjust the base URL setting in the Sphinx configuration.
107+ This modification allows your site to correctly resolve URLs in the context of the preview environment.
108+
109+ Follow the steps below to make these changes :
110+
111+ 1. Open the `conf.py` file located in the root directory of your Sphinx project.
112+
113+ 1. Modify the `base_url` setting to dynamically adapt to different environments, particularly for preview deployments. Update the setting as follows :
114+
115+ ` ` ` python
116+ import os
117+ html_baseurl = os.getenv('BASE_URL', 'https://yourdomain.extension')
118+ ` ` `
119+
120+ 1. Save your changes and push the updated `pushpreview.yml` file to your repository.
121+
122+ # # 4. Verify the installation
107123
108124<VerifyInstallation />
109125
You can’t perform that action at this time.
0 commit comments