From feab737a7db8e5582ce59e66b51e7590026e7c8d Mon Sep 17 00:00:00 2001 From: Lakshmi Vyasarajan Date: Tue, 25 Jan 2011 00:15:23 +0530 Subject: [PATCH] Fixes for whitespaces and first time generation --- hyde/ext/templates/jinja.py | 1 + hyde/generator.py | 2 ++ 2 files changed, 3 insertions(+) diff --git a/hyde/ext/templates/jinja.py b/hyde/ext/templates/jinja.py index 26088f9..eba9be4 100644 --- a/hyde/ext/templates/jinja.py +++ b/hyde/ext/templates/jinja.py @@ -276,6 +276,7 @@ class HydeLoader(FileSystemLoader): """ Calls the plugins to preprocess prior to returning the source. """ + template = template.strip() logger.debug("Loading template [%s] and preprocessing" % template) (contents, filename, diff --git a/hyde/generator.py b/hyde/generator.py index 065b6ef..e86ac75 100644 --- a/hyde/generator.py +++ b/hyde/generator.py @@ -147,6 +147,8 @@ class Generator(object): Checks if the given resource has changed since the last generation. """ + if not self.generated_once: + return True self.load_site_if_needed() self.load_template_if_needed() target = File(self.site.config.deploy_root_path.child(