Skip to content
Snippets Groups Projects
Commit 7fc89467 authored by Josh Borrow's avatar Josh Borrow
Browse files

added ability for items to be hidden

parent ac97adf7
Branches about-page-information
No related tags found
No related merge requests found
...@@ -109,13 +109,19 @@ def compile_to_yaml(in_filename="about_meta.yaml", out_filename="about.yaml", da ...@@ -109,13 +109,19 @@ def compile_to_yaml(in_filename="about_meta.yaml", out_filename="about.yaml", da
external yaml file. """ external yaml file. """
meta_data = open_meta(in_filename, data_dir) 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)) sidebar = parse_headings(parse_html(output_text))
output_data = { output_data = {
"meta_data": meta_data, "meta_data": meta_data_clean,
"output_text": output_text, "output_text": output_text,
"sidebar": sidebar "sidebar": sidebar
} }
......
...@@ -7,18 +7,21 @@ files: [ ...@@ -7,18 +7,21 @@ files: [
name: public.md, name: public.md,
slug: public, slug: public,
title: I'm a member of the <b>public</b>, title: I'm a member of the <b>public</b>,
subtitle: (non-technical description) subtitle: (non-technical description),
hidden: false
}, },
{ {
name: astro.md, name: astro.md,
slug: astro, slug: astro,
title: I'm an <b>astronomer</b>, title: I'm an <b>astronomer</b>,
subtitle: "(SPH, gravity accuracy, etc.)" subtitle: "(SPH, gravity accuracy, etc.)",
hidden: true
}, },
{ {
name: cs.md, name: cs.md,
slug: cs, slug: cs,
title: I'm a <b>computer scientist</b>, title: I'm a <b>computer scientist</b>,
subtitle: "(technical code description)" subtitle: "(technical code description)",
hidden: true
} }
] ]
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment