Skip to content

Commit ee194e2

Browse files
committed
🚸 Redirect changed user/pipelines URLs
1 parent afcc3d8 commit ee194e2

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

.circleci/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ commands:
1515
command: |
1616
sudo apt-get update && sudo apt-get -y install git python3-dev graphviz graphviz-dev libgraphviz-dev pkg-config python3-sphinx
1717
pip install --user -r https://raw.githubusercontent.com/FCP-INDI/C-PAC/<< parameters.version >>/requirements.txt
18-
pip install --user git+https://github.com/${CIRCLE_PROJECT_USERNAME}/C-PAC.git@<< parameters.version >> sphinx m2r numpydoc PyGithub "sphinxcontrib-bibtex<2.0" sphinxcontrib-fulltoc sphinxcontrib-programoutput semver torch
18+
pip install --user git+https://github.com/${CIRCLE_PROJECT_USERNAME}/C-PAC.git@<< parameters.version >> sphinx m2r numpydoc PyGithub "sphinxcontrib-bibtex<2.0" sphinxcontrib-fulltoc sphinxcontrib-programoutput sphinx-reredirects semver torch
1919
git clone https://github.com/${CIRCLE_PROJECT_USERNAME}/C-PAC.git /home/circleci/build/C-PAC
2020
cd /home/circleci/build/C-PAC
2121
git checkout << parameters.version >>

docs/_sources/conf.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@ def compare_versions(new, old):
116116
# extensions
117117
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
118118
extensions = [
119+
'sphinx_reredirects',
119120
'sphinx.ext.autodoc',
120121
'sphinxcontrib.bibtex',
121122
'sphinxcontrib.fulltoc',
@@ -153,6 +154,13 @@ def compare_versions(new, old):
153154
# The short X.Y version.
154155
version = __version__
155156

157+
# Set redirects for renamed pages
158+
redirects = {
159+
'user/design_a_pipeline': 'user/pipelines/design_a_pipeline',
160+
'user/pipeline_config': 'user/pipelines/pipeline_config',
161+
'user/preconfig': 'user/pipelines/preconfig'
162+
}
163+
156164

157165
# Get tags from GitHub
158166
# Set GITHUBTOKEN to your API token in your environment to increase rate limit.

0 commit comments

Comments
 (0)