-fn recursively_copy(source: &PathBuf, target: &PathBuf) -> Result<()> {
- let entries = read_dir(source)?;
- for entry in entries {
- let entry = entry?;
- let entry_type = entry.file_type()?;
- let entry_name = entry.file_name();
- let entry_source = entry.path();
- let entry_target = target.join(entry_name);
-
- if entry_type.is_dir() {
- create_dir_all(&entry_target)?;
- recursively_copy(&entry_source, &entry_target)?;
- } else {
- copy(&entry_source, &entry_target)?;
- }
- }
-
- Ok(())
-}
-
-pub fn generate(source: &PathBuf, _: &PathBuf, target: &PathBuf, _: &Vec<Post>) -> Result<()> {
+pub fn generate(source: &PathBuf, _: &PathBuf, target: &PathBuf, _: &TemplateContext) -> Result<()> {