From 67698a3aa1e70a216dbcde5ad0c862f28b0ec1d4 Mon Sep 17 00:00:00 2001 From: Vincent Prouillet Date: Wed, 12 Sep 2018 16:45:52 +0200 Subject: [PATCH] Move to non-deprecated fns --- components/site/src/lib.rs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/components/site/src/lib.rs b/components/site/src/lib.rs index 775d5348..29d59167 100644 --- a/components/site/src/lib.rs +++ b/components/site/src/lib.rs @@ -289,23 +289,23 @@ impl Site { /// Adds global fns that are to be available to shortcodes while rendering markdown pub fn register_early_global_fns(&mut self) { - self.tera.register_global_function( + self.tera.register_function( "get_url", global_fns::make_get_url(self.permalinks.clone(), self.config.clone()), ); - self.tera.register_global_function( + self.tera.register_function( "resize_image", global_fns::make_resize_image(self.imageproc.clone()), ); } pub fn register_tera_global_fns(&mut self) { - self.tera.register_global_function("trans", global_fns::make_trans(self.config.clone())); - self.tera.register_global_function("get_page", global_fns::make_get_page(&self.pages)); - self.tera.register_global_function("get_section", global_fns::make_get_section(&self.sections)); - self.tera.register_global_function( + self.tera.register_function("trans", global_fns::make_trans(self.config.clone())); + self.tera.register_function("get_page", global_fns::make_get_page(&self.pages)); + self.tera.register_function("get_section", global_fns::make_get_section(&self.sections)); + self.tera.register_function( "get_taxonomy", global_fns::make_get_taxonomy(self.taxonomies.clone()), ); - self.tera.register_global_function( + self.tera.register_function( "get_taxonomy_url", global_fns::make_get_taxonomy_url(self.taxonomies.clone()), );