Tholp's bespoke website generator
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Disable writing .sko files by default

Tholp 914b2748 91eca0d2

+12 -3
+5 -2
src/main.rs
··· 93 93 &project.filegroups[i].files[k].file_skidout.clone(), 94 94 &project.filegroups[i].files[k].file_out.clone(), 95 95 convert_html, 96 + project.write_skidout, 96 97 &process_skid(&tokens, &mut project, &mut skid_context), 97 98 file_start, 98 99 ); ··· 368 369 file_skidout: &PathBuf, 369 370 file_out: &PathBuf, 370 371 convert_html: bool, 372 + write_skidout: bool, 371 373 tokens: &[Token], 372 374 file_start: Instant, 373 375 ) { ··· 388 390 } 389 391 390 392 if convert_html { 391 - fs::write(&file_skidout, &skid_output).expect("Couldn't write skid to file"); 392 - 393 + if write_skidout { 394 + fs::write(&file_skidout, &skid_output).expect("Couldn't write skid to file"); 395 + } 393 396 //let html_output = markdown::to_html(&skid_output); 394 397 let html_output = markdown::to_html_with_options( 395 398 &skid_output,
+6
src/project.rs
··· 14 14 pub global_pre_insert: PathBuf, 15 15 pub global_post_insert: PathBuf, 16 16 17 + pub write_skidout: bool, 18 + 17 19 pub filemap: Vec<PathBuf>, // mapped to index 18 20 pub section_name_map: Vec<String>, 19 21 } ··· 70 72 output_folder: PathBuf::new(), 71 73 global_pre_insert: PathBuf::new(), 72 74 global_post_insert: PathBuf::new(), 75 + 76 + write_skidout: true, 73 77 filemap: Vec::new(), 74 78 section_name_map: Vec::new(), 75 79 }; ··· 109 113 "postInsertGlobal", 110 114 "" 111 115 )); 116 + 117 + project.write_skidout = get_table_bool_or_default!(settings_section, "writeSkidout", false); 112 118 113 119 for (k, v) in filegroups_section { 114 120 if !v.is_table() {
+1 -1
src/stringtools.rs
··· 256 256 //trim whitespace from the ends 257 257 pub fn trim_whitespace_tokens(tokens: &[Token]) -> &[Token] { 258 258 if tokens.len() == 0 { 259 - return tokens; 259 + return tokens; 260 260 } 261 261 262 262 let mut start: usize = 0;