Skip to content
This repository has been archived by the owner on Apr 16, 2019. It is now read-only.

Commit

Permalink
Moves static definition of "blog" out of the main config.
Browse files Browse the repository at this point in the history
  • Loading branch information
EnigmaCurry committed Feb 6, 2011
1 parent 34f27be commit 6b9798d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 0 additions & 3 deletions blogofile/config.py
Expand Up @@ -51,9 +51,6 @@ def recompile():
else: else:
#p could just be a pre-compiled regex #p could just be a pre-compiled regex
site.compiled_file_ignore_patterns.append(p) site.compiled_file_ignore_patterns.append(p)
import urlparse
global blog
blog.url = urlparse.urljoin(site.url, blog.path)


def __load_config(path=None): def __load_config(path=None):
#Strategy: #Strategy:
Expand Down
@@ -1,4 +1,5 @@
import logging import logging
import urlparse
from mako.lookup import TemplateLookup from mako.lookup import TemplateLookup


from blogofile.cache import bf from blogofile.cache import bf
Expand Down Expand Up @@ -102,6 +103,7 @@ def materialize_template(template_name, location, attrs={}, lookup=None):
bf.writer.materialize_template(template_name, location, attrs, lookup) bf.writer.materialize_template(template_name, location, attrs, lookup)


def init(): def init():
config["url"] = urlparse.urljoin(bf.config.site.url, config["path"])
global template_lookup global template_lookup
template_lookup = TemplateLookup( template_lookup = TemplateLookup(
directories=[config["template_path"],"_templates"], directories=[config["template_path"],"_templates"],
Expand All @@ -126,7 +128,7 @@ def run():
categories.sort_into_categories() categories.sort_into_categories()


blog.logger = logging.getLogger(config['name']) blog.logger = logging.getLogger(config['name'])

permapage.run() permapage.run()
chronological.run() chronological.run()
archives.run() archives.run()
Expand Down

0 comments on commit 6b9798d

Please sign in to comment.