From 83472a53d728e6a1f5788996c99abed275e461e9 Mon Sep 17 00:00:00 2001 From: Vincent Prouillet Date: Thu, 17 Jan 2019 18:18:02 +0100 Subject: [PATCH] Register load_data early Closes #582 --- CHANGELOG.md | 5 ++++- components/site/src/lib.rs | 8 ++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9c2d8b20..e3c7e58b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,10 @@ - Add support for content in multiple languages - Lower latency on serve before rebuilding from 2 to 1 second - Allow processing PNG and produced images are less blurry -- Add an id (`zola-continue-reading`) +- Add an id (`zola-continue-reading`) to the paragraph generated after a summary +- Add Dracula syntax highlighting theme +- Fix using inline styles in headers + ## 0.5.1 (2018-12-14) diff --git a/components/site/src/lib.rs b/components/site/src/lib.rs index 9b59e564..bffc3feb 100644 --- a/components/site/src/lib.rs +++ b/components/site/src/lib.rs @@ -335,6 +335,10 @@ impl Site { "resize_image", global_fns::make_resize_image(self.imageproc.clone()), ); + self.tera.register_function( + "load_data", + global_fns::make_load_data(self.content_path.clone(), self.base_path.clone()), + ); } pub fn register_tera_global_fns(&mut self) { @@ -349,10 +353,6 @@ impl Site { "get_taxonomy_url", global_fns::make_get_taxonomy_url(&self.taxonomies), ); - self.tera.register_function( - "load_data", - global_fns::make_load_data(self.content_path.clone(), self.base_path.clone()), - ); } /// Add a page to the site