You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// We don't want to concatenate the name twice if we don't have to
65
44
false => template_path.clone()
66
45
};
67
46
68
47
// Handle static initial state generation
69
48
// We'll only write a static state if one is explicitly generated
70
-
ifrender_opts.contains(&RenderOpt::StaticProps){
49
+
iftemplate.uses_build_state(){
71
50
// We pass in the latter part of the path, without the base specifier (because that would be the same for everything in the template)
72
51
let initial_state = template.get_build_state(path.to_string())?;
73
52
// Write that intial state to a static JSON file
@@ -89,7 +68,6 @@ pub fn build_template(
89
68
// If the template is very basic, prerender without any state
90
69
// It's safe to add a property to the render options here because `.is_basic()` will only return true if path generation is not being used (or anything else)
91
70
if template.is_basic(){
92
-
render_opts.push(RenderOpt::StaticProps);
93
71
let prerendered = sycamore::render_to_string(
94
72
||
95
73
template.render_for_template(None)
@@ -100,55 +78,47 @@ pub fn build_template(
100
78
}
101
79
}
102
80
103
-
Ok((render_opts,paths, single_page))
81
+
Ok((paths, single_page))
104
82
}
105
83
106
84
// TODO function to build pages
107
85
/// Runs the build process of building many different templates.
0 commit comments