chore: fix tera path conversion
This commit is contained in:
		
							parent
							
								
									d7748b4dc7
								
							
						
					
					
						commit
						c2d0aea9d4
					
				@ -1,5 +1,5 @@
 | 
			
		||||
[package]
 | 
			
		||||
name = "rtplfile"
 | 
			
		||||
name = "rtpldatafile"
 | 
			
		||||
version = "0.1.0"
 | 
			
		||||
authors = ["JesusPerez <jpl@jesusperez.pro>"]
 | 
			
		||||
edition = "2021"
 | 
			
		||||
 | 
			
		||||
@ -130,7 +130,7 @@ pub fn hash_from_data(path: &str, ctx: &mut tera::Context, data_hash: &mut HashM
 | 
			
		||||
          }
 | 
			
		||||
        } else if let Some(table_data) = data.as_table() {
 | 
			
		||||
            for (key, value) in table_data {
 | 
			
		||||
              println!("-{}-{}",&key,&value);
 | 
			
		||||
              // println!("-{}-{}",&key,&value);
 | 
			
		||||
              let val = get_toml_val(&value, "".into());
 | 
			
		||||
              check_value(key.into(),val);
 | 
			
		||||
            }
 | 
			
		||||
@ -191,7 +191,7 @@ pub fn data_templated(
 | 
			
		||||
  }
 | 
			
		||||
  tera.add_raw_templates(all_tpls)?;
 | 
			
		||||
  let res = tera.render("data-template.html", &tpl_context)?;
 | 
			
		||||
  Ok(res)
 | 
			
		||||
	Ok(res.replace("/","/"))
 | 
			
		||||
}
 | 
			
		||||
/// Read a `file_name` from a path (root / `file_name`) ( "" `file_name_full_path` )
 | 
			
		||||
/// format of reading can be matched with `file_type`
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user