Browse Source

Do not clone tpl name for pages

index-subcmd
Vincent Prouillet 6 years ago
parent
commit
2d324b3cee
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      components/library/src/content/page.rs

+ 2
- 2
components/library/src/content/page.rs View File

@@ -228,8 +228,8 @@ impl Page {
/// Renders the page using the default layout, unless specified in front-matter /// Renders the page using the default layout, unless specified in front-matter
pub fn render_html(&self, tera: &Tera, config: &Config, library: &Library) -> Result<String> { pub fn render_html(&self, tera: &Tera, config: &Config, library: &Library) -> Result<String> {
let tpl_name = match self.meta.template { let tpl_name = match self.meta.template {
Some(ref l) => l.to_string(),
None => "page.html".to_string(),
Some(ref l) => l,
None => "page.html",
}; };


let mut context = TeraContext::new(); let mut context = TeraContext::new();


Loading…
Cancel
Save