diff --git a/content/about-treehouse.tree b/content/about-treehouse.tree index a833e95..8215682 100644 --- a/content/about-treehouse.tree +++ b/content/about-treehouse.tree @@ -41,14 +41,9 @@ + *where?* % id = "01H89RFHCQW4NN6PW6V6RFCVH3" + content.link = "about-treehouse/uh" + ***WHERE???*** - % id = "01H89RFHCQ83APVW034YC40K5P" - + here, actually. - - % id = "01H89RFHCQ0SYWSQZDYHRXKAR0" - - I lied. I didn't build this tech to support infinite nesting, as that would require infinite disk space. which I don't have. - % id = "01H89RFHCQPAMNSN81SRVH2TZ5" - always evolving and shaping and shifting diff --git a/content/about-treehouse/uh.tree b/content/about-treehouse/uh.tree new file mode 100644 index 0000000..9b5044c --- /dev/null +++ b/content/about-treehouse/uh.tree @@ -0,0 +1,3 @@ +% content.link = "about-treehouse/uh" + do_not_persist = true ++ … diff --git a/crates/treehouse/src/cli/regenerate.rs b/crates/treehouse/src/cli/regenerate.rs index 8ae097d..1b5dee0 100644 --- a/crates/treehouse/src/cli/regenerate.rs +++ b/crates/treehouse/src/cli/regenerate.rs @@ -154,6 +154,11 @@ impl Generator { } }; + std::fs::create_dir_all( + target_path + .parent() + .expect("there should be a parent directory to generate files into"), + )?; std::fs::write(target_path, templated_html)?; } } diff --git a/crates/treehouse/src/html/tree.rs b/crates/treehouse/src/html/tree.rs index 4892cfc..6363ace 100644 --- a/crates/treehouse/src/html/tree.rs +++ b/crates/treehouse/src/html/tree.rs @@ -37,9 +37,15 @@ pub fn branch_to_html( String::new() }; + let do_not_persist = if branch.attributes.do_not_persist { + " data-th-do-not-persist=\"\"" + } else { + "" + }; + write!( s, - "