summaryrefslogtreecommitdiffstats
path: root/src/generator/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/generator/mod.rs')
-rw-r--r--src/generator/mod.rs23
1 files changed, 11 insertions, 12 deletions
diff --git a/src/generator/mod.rs b/src/generator/mod.rs
index 3f62779..f351bb1 100644
--- a/src/generator/mod.rs
+++ b/src/generator/mod.rs
@@ -17,7 +17,7 @@ const DEFAULT_CSS: &[u8] = include_bytes!("../../res/style.css");
17 17
18pub(crate) fn generate( 18pub(crate) fn generate(
19 base_dir: &Path, 19 base_dir: &Path,
20 entities: BTreeMap<EntityId, Entity>, 20 toplevel_entity: Entity,
21 config: &Config, 21 config: &Config,
22) -> Result<()> { 22) -> Result<()> {
23 let md_output_dir = base_dir.join("markdown"); 23 let md_output_dir = base_dir.join("markdown");
@@ -38,17 +38,16 @@ pub(crate) fn generate(
38 debug!("Generated temporary file with CSS at: {:?}", css_path); 38 debug!("Generated temporary file with CSS at: {:?}", css_path);
39 39
40 rayon::scope(|scope| { 40 rayon::scope(|scope| {
41 for (id, entity) in entities { 41 generate_recursively(
42 generate_recursively( 42 // TODO: a bit hacky?
43 id, 43 EntityId(String::from("index")),
44 entity, 44 toplevel_entity,
45 scope, 45 scope,
46 &md_output_dir, 46 &md_output_dir,
47 &html_output_dir, 47 &html_output_dir,
48 css_path, 48 css_path,
49 config, 49 config,
50 ); 50 );
51 }
52 }); 51 });
53 52
54 Ok(()) 53 Ok(())