Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
MKDocs Template
Manage
Activity
Members
Labels
Plan
Issues
3
Issue boards
Milestones
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Harbor Registry
Model registry
Analyze
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
PAGoDA
Tools
MKDocs Template
Commits
4d343294
Verified
Commit
4d343294
authored
4 years ago
by
Romain Deville
Browse files
Options
Downloads
Plain Diff
upstream/master into master
parents
6ae82e87
53797d4d
No related branches found
No related tags found
No related merge requests found
Pipeline
#9429
canceled with stages
Changes
1
Pipelines
3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
templates/docs/_data/plugins.py
+17
-4
17 additions, 4 deletions
templates/docs/_data/plugins.py
with
17 additions
and
4 deletions
templates/docs/_data/plugins.py
+
17
−
4
View file @
4d343294
...
@@ -100,6 +100,7 @@ def add_internal_to_nav(
...
@@ -100,6 +100,7 @@ def add_internal_to_nav(
"""
"""
if
nav_parent
:
if
nav_parent
:
for
i_nav
in
nav
:
for
i_nav
in
nav
:
# "nav_entry" is a key of current parsed `nav`
if
nav_parent
[
0
]
in
i_nav
:
if
nav_parent
[
0
]
in
i_nav
:
for
i_key
in
i_nav
:
for
i_key
in
i_nav
:
add_internal_to_nav
(
add_internal_to_nav
(
...
@@ -109,6 +110,16 @@ def add_internal_to_nav(
...
@@ -109,6 +110,16 @@ def add_internal_to_nav(
repo_parent
,
repo_parent
,
nav_parent
[
1
:],
nav_parent
[
1
:],
)
)
# "nav_entry" is a subkey of current parsed `nav`
elif
nav_parent
[
0
]
in
yaml
.
dump
(
i_nav
):
for
i_key
in
i_nav
:
add_internal_to_nav
(
env
,
i_nav
[
i_key
],
repo_dict
,
repo_parent
,
nav_parent
[
0
:],
)
else
:
else
:
mkdocs_path
=
env
.
project_dir
mkdocs_path
=
env
.
project_dir
for
i_parent
in
repo_parent
:
for
i_parent
in
repo_parent
:
...
@@ -233,13 +244,15 @@ def update_nav(
...
@@ -233,13 +244,15 @@ def update_nav(
nav_parent
.
append
(
repo_dict
[
"
nav_entry
"
])
nav_parent
.
append
(
repo_dict
[
"
nav_entry
"
])
elif
i_key
==
"
internal
"
:
elif
i_key
==
"
internal
"
:
for
i_repo
in
repo_dict
[
"
internal
"
]:
for
i_repo
in
repo_dict
[
"
internal
"
]:
add_nav_entry
(
env
.
conf
[
"
nav
"
],
nav_parent
)
if
nav_parent
[
0
]
not
in
yaml
.
dump
(
env
.
conf
[
"
nav
"
]):
add_nav_entry
(
env
.
conf
[
"
nav
"
],
nav_parent
)
add_internal_to_nav
(
add_internal_to_nav
(
env
,
env
.
conf
[
"
nav
"
],
i_repo
,
repo_parent
,
nav_parent
env
,
env
.
conf
[
"
nav
"
],
i_repo
,
repo_parent
,
nav_parent
)
)
elif
i_key
==
"
external
"
:
elif
i_key
==
"
external
"
:
for
i_repo
in
repo_dict
[
"
external
"
]:
for
i_repo
in
repo_dict
[
"
external
"
]:
add_nav_entry
(
env
.
conf
[
"
nav
"
],
nav_parent
)
if
nav_parent
[
0
]
not
in
yaml
.
dump
(
env
.
conf
[
"
nav
"
]):
add_nav_entry
(
env
.
conf
[
"
nav
"
],
nav_parent
)
add_external_to_nav
(
add_external_to_nav
(
env
,
env
.
conf
[
"
nav
"
],
i_repo
,
repo_parent
,
nav_parent
env
,
env
.
conf
[
"
nav
"
],
i_repo
,
repo_parent
,
nav_parent
)
)
...
@@ -562,7 +575,7 @@ def set_config(env: dict) -> None:
...
@@ -562,7 +575,7 @@ def set_config(env: dict) -> None:
if
"
subrepo
"
in
env
.
variables
:
if
"
subrepo
"
in
env
.
variables
:
if
(
if
(
env
.
variables
[
"
internal_subdoc
"
]
not
env
.
variables
[
"
internal_subdoc
"
]
and
"
monorepo
"
in
env
.
conf
[
"
plugins
"
]
and
"
monorepo
"
in
env
.
conf
[
"
plugins
"
]
):
):
env
.
conf
[
"
plugins
"
].
pop
(
"
monorepo
"
)
env
.
conf
[
"
plugins
"
].
pop
(
"
monorepo
"
)
...
@@ -683,7 +696,7 @@ def update_subrepo_info(
...
@@ -683,7 +696,7 @@ def update_subrepo_info(
f
"
{
INFO_CLR
}
INFO [macros] - Pulling repo
{
i_repo
[
'
name
'
]
}{
RESET_CLR
}
"
f
"
{
INFO_CLR
}
INFO [macros] - Pulling repo
{
i_repo
[
'
name
'
]
}{
RESET_CLR
}
"
)
)
git_subrepo
=
git
.
Repo
(
subrepo_root
)
git_subrepo
=
git
.
Repo
(
subrepo_root
)
git_subrepo
.
remotes
.
origin
.
pull
()
git_subrepo
.
remotes
.
origin
.
pull
(
'
master
'
)
else
:
else
:
print
(
print
(
f
"
{
INFO_CLR
}
INFO [macros] - Cloning repo
{
i_repo
[
'
name
'
]
}{
RESET_CLR
}
"
f
"
{
INFO_CLR
}
INFO [macros] - Cloning repo
{
i_repo
[
'
name
'
]
}{
RESET_CLR
}
"
...
...
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