diff --git a/hyde/layouts/basic/site.yaml b/hyde/layouts/basic/site.yaml index bf24e3f..de90308 100644 --- a/hyde/layouts/basic/site.yaml +++ b/hyde/layouts/basic/site.yaml @@ -56,4 +56,6 @@ tagger: source: blog target: blog/tags template: tagged_posts.j2 - archive_extension: html \ No newline at end of file + archive_extension: html + meta: + listable: false \ No newline at end of file diff --git a/hyde/model.py b/hyde/model.py index 2c2b143..bef9a34 100644 --- a/hyde/model.py +++ b/hyde/model.py @@ -140,7 +140,7 @@ class Config(Expando): """ def __init__(self, sitepath, config_file=None, config_dict=None): - default_config = dict( + self.default_config = dict( mode='production', content_root='content', deploy_root='deploy', @@ -160,11 +160,7 @@ class Config(Expando): self.load_time = datetime.min self.config_files = [] self.sitepath = Folder(sitepath) - conf = dict(**default_config) - conf.update(self.read_config(config_file)) - if config_dict: - conf.update(config_dict) - super(Config, self).__init__(conf) + super(Config, self).__init__(self.load()) @property def last_modified(self): @@ -176,6 +172,19 @@ class Config(Expando): return any((conf.has_changed_since(self.load_time) for conf in self.config_files)) + def load(self): + conf = dict(**self.default_config) + conf.update(self.read_config(self.config_file)) + if self.config_dict: + conf.update(self.config_dict) + return conf + + def reload(self): + if not self.config_file: + return + self.update(self.load()) + + def read_config(self, config_file): """ Reads the configuration file and updates this diff --git a/hyde/server.py b/hyde/server.py index a7a8c2b..5cda149 100644 --- a/hyde/server.py +++ b/hyde/server.py @@ -191,6 +191,8 @@ class HydeWebServer(HTTPServer): try: logger.info('Regenerating the entire site') self.regeneration_time = datetime.now() + if self.site.config.needs_refresh(): + self.site.config.reload() self.site.load() self.generator.generate_all(incremental=False) except Exception, exception: