From 11c58458e8bf3ffebf4c4dff4668ce4dff81fd69 Mon Sep 17 00:00:00 2001 From: Vincent Prouillet Date: Fri, 22 Feb 2019 21:02:42 +0100 Subject: [PATCH] Revert useless change in shortcodes --- .gitignore | 1 + components/rendering/src/shortcode.rs | 4 +--- components/site/benches/gen.py | 1 + 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 777cd7b2..fd58a410 100644 --- a/.gitignore +++ b/.gitignore @@ -8,6 +8,7 @@ small-blog medium-blog big-blog huge-blog +extra-huge-blog small-kb medium-kb huge-kb diff --git a/components/rendering/src/shortcode.rs b/components/rendering/src/shortcode.rs index 0ef0488b..4bf7c691 100644 --- a/components/rendering/src/shortcode.rs +++ b/components/rendering/src/shortcode.rs @@ -1,5 +1,3 @@ -use std::path::MAIN_SEPARATOR; - use pest::iterators::Pair; use pest::Parser; use regex::Regex; @@ -114,7 +112,7 @@ fn render_shortcode( } tera_context.extend(context.tera_context.clone()); - let template_name = format!("shortcodes{}{}.html", MAIN_SEPARATOR, name); + let template_name = format!("shortcodes/{}.html", name); let res = utils::templates::render_template(&template_name, &context.tera, tera_context, &None) .map_err(|e| Error::chain(format!("Failed to render {} shortcode", name), e))?; diff --git a/components/site/benches/gen.py b/components/site/benches/gen.py index 060104f5..c30709ba 100644 --- a/components/site/benches/gen.py +++ b/components/site/benches/gen.py @@ -169,6 +169,7 @@ if __name__ == "__main__": gen_site("medium-blog", [""], 250, is_blog=True) gen_site("big-blog", [""], 1000, is_blog=True) gen_site("huge-blog", [""], 10000, is_blog=True) + gen_site("extra-huge-blog", [""], 100000, is_blog=True) gen_site("small-kb", ["help", "help1", "help2", "help3", "help4", "help5", "help6", "help7", "help8", "help9"], 10) gen_site("medium-kb", ["help", "help1", "help2", "help3", "help4", "help5", "help6", "help7", "help8", "help9"], 100)