Parse the org-mode files.
This commit is contained in:
		
							parent
							
								
									acaa12cb6e
								
							
						
					
					
						commit
						816780589f
					
				| @ -8,7 +8,22 @@ use walkdir::WalkDir; | ||||
| 
 | ||||
| pub(crate) async fn build_site(args: BuildArgs) -> Result<(), Box<dyn std::error::Error>> { | ||||
|     let config = Config::load_from_file(args.config).await?; | ||||
|     let org_files = get_org_files(config.get_root_directory())?; | ||||
|     let org_files = { | ||||
|         let mut ret = Vec::new(); | ||||
|         let org_files_iter = get_org_files(config.get_root_directory())?; | ||||
|         for entry in org_files_iter { | ||||
|             ret.push(entry.await??); | ||||
|         } | ||||
|         ret | ||||
|     }; | ||||
|     let parsed_org_files = { | ||||
|         let mut ret = Vec::new(); | ||||
|         for (path, contents) in org_files.iter() { | ||||
|             let parsed = organic::parser::parse_file(contents.as_str(), Some(path))?; | ||||
|             ret.push((path, contents, parsed)); | ||||
|         } | ||||
|         ret | ||||
|     }; | ||||
| 
 | ||||
|     Ok(()) | ||||
| } | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Tom Alexander
						Tom Alexander