Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
GÉANT Service Orchestrator
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
GÉANT Orchestration and Automation Team
GAP
GÉANT Service Orchestrator
Commits
bdfd400e
Verified
Commit
bdfd400e
authored
3 months ago
by
Karel van Klink
Browse files
Options
Downloads
Patches
Plain Diff
Add a script that auto-generates redirects to all workflow pages
parent
49d22a34
No related branches found
No related tags found
1 merge request
!316
Replace Sphinx with MkDocs
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
.gitignore
+1
-0
1 addition, 0 deletions
.gitignore
docs/scripts/gen_wf_redirects.py
+38
-0
38 additions, 0 deletions
docs/scripts/gen_wf_redirects.py
mkdocs.yml
+1
-9
1 addition, 9 deletions
mkdocs.yml
with
40 additions
and
9 deletions
.gitignore
+
1
−
0
View file @
bdfd400e
...
...
@@ -17,6 +17,7 @@ vale/styles/*
!vale/styles/config/
!vale/styles/custom/
.DS_Store
wf_redirects.yaml
.idea
.venv
...
...
This diff is collapsed.
Click to expand it.
docs/scripts/gen_wf_redirects.py
0 → 100644
+
38
−
0
View file @
bdfd400e
"""
Generate pages to forward workflow URLs.
This will redirect `/workflow/workflow_name` to `reference/gso/workflow/module/workflow_name`. This is required since
URLs cannot be changed in the GUI.
"""
from
pathlib
import
Path
import
yaml
root
=
Path
(
__file__
).
parent
.
parent
.
parent
src
=
root
/
"
gso
"
redirect_map
=
{}
for
path
in
sorted
(
src
.
rglob
(
"
*.py
"
)):
module_path
=
path
.
relative_to
(
root
).
with_suffix
(
""
)
parts
=
tuple
(
module_path
.
parts
)
if
parts
[
-
1
]
==
"
__init__
"
:
parts
=
parts
[:
-
1
]
elif
parts
[
-
1
]
==
"
__main__
"
:
continue
if
len
(
parts
)
==
4
and
"
workflows
"
in
parts
:
redirect_map
[
"
workflow/
"
+
parts
[
3
]
+
"
/index.md
"
]
=
"
https://docs.gap.geant.org/reference/
"
+
"
/
"
.
join
(
parts
)
with
open
(
root
/
"
wf_redirects.yaml
"
,
'
w
'
)
as
redirect_file
:
file_content
=
{
"
plugins
"
:
[
"
search
"
,
{
"
gen-files
"
:
{
"
scripts
"
:
[
"
docs/scripts/gen_ref_pages.py
"
]}},
{
"
redirects
"
:
{
"
redirect_maps
"
:
redirect_map
}},
{
"
literate-nav
"
:
{
"
nav_file
"
:
"
SUMMARY.md
"
}},
"
mkdocstrings
"
,
]
}
yaml
.
dump
(
file_content
,
redirect_file
)
This diff is collapsed.
Click to expand it.
mkdocs.yml
+
1
−
9
View file @
bdfd400e
INHERIT
:
wf_redirects.yaml
# General
site_name
:
GÉANT Automation Platform
site_url
:
https://docs.gap.geant.org/
...
...
@@ -44,15 +45,6 @@ theme:
extra_css
:
-
assets/stylesheets/extra.css
plugins
:
-
search
-
gen-files
:
scripts
:
-
docs/scripts/gen_ref_pages.py
-
literate-nav
:
nav_file
:
SUMMARY.md
-
mkdocstrings
# Page tree
nav
:
-
Home
:
index.md
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment