Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
SWIFTweb
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
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
SWIFT
SWIFTweb
Commits
7fc89467
Commit
7fc89467
authored
7 years ago
by
Josh Borrow
Browse files
Options
Downloads
Patches
Plain Diff
added ability for items to be hidden
parent
ac97adf7
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
about.py
+8
-2
8 additions, 2 deletions
about.py
data/about_meta.yaml
+7
-4
7 additions, 4 deletions
data/about_meta.yaml
with
15 additions
and
6 deletions
about.py
+
8
−
2
View file @
7fc89467
...
...
@@ -109,13 +109,19 @@ def compile_to_yaml(in_filename="about_meta.yaml", out_filename="about.yaml", da
external yaml file.
"""
meta_data
=
open_meta
(
in_filename
,
data_dir
)
# At this stage it is smart to remove the 'hidden' files.
meta_data_clean
=
{
"
files
"
:
[
item
for
item
in
meta_data
[
"
files
"
]
if
not
item
[
"
hidden
"
]
]
}
output_text
=
compile_markdown
(
meta_data
,
data_dir
)
output_text
=
compile_markdown
(
meta_data
_clean
,
data_dir
)
sidebar
=
parse_headings
(
parse_html
(
output_text
))
output_data
=
{
"
meta_data
"
:
meta_data
,
"
meta_data
"
:
meta_data
_clean
,
"
output_text
"
:
output_text
,
"
sidebar
"
:
sidebar
}
...
...
This diff is collapsed.
Click to expand it.
data/about_meta.yaml
+
7
−
4
View file @
7fc89467
...
...
@@ -7,18 +7,21 @@ files: [
name
:
public.md
,
slug
:
public
,
title
:
I'm a member of the <b>public</b>
,
subtitle
:
(non-technical description)
subtitle
:
(non-technical description)
,
hidden
:
false
},
{
name
:
astro.md
,
slug
:
astro
,
title
:
I'm an <b>astronomer</b>
,
subtitle
:
"
(SPH,
gravity
accuracy,
etc.)"
subtitle
:
"
(SPH,
gravity
accuracy,
etc.)"
,
hidden
:
true
},
{
name
:
cs.md
,
slug
:
cs
,
title
:
I'm a <b>computer scientist</b>
,
subtitle
:
"
(technical
code
description)"
subtitle
:
"
(technical
code
description)"
,
hidden
:
true
}
]
\ No newline at end of file
]
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