Skip to main content

resolve

Function resolve 

Source
pub fn resolve(name: &str, base: &Path) -> Result<Theme, ThemeError>
Expand description

Resolves a theme name against base.

§Errors

ThemeError::NotFound when no search root holds a directory of that name, and ThemeError::NoLayouts when one does but contains neither _layouts/ nor templates/.

§Examples

let theme = ssg::theme::resolve("quill", tmp.path()).unwrap();
assert!(theme.template_dir.ends_with("_layouts"));