M muyhomepage2/app/build.py +2 -1
@@ 102,7 102,8 @@ def compile_page(config, website, pctx):
print 'Building:', pctx.page.title
tname = pctx.template()
scope = dict(current=pctx, site=website, config=config,
- ext=pctx.extension(website, config))
+ ext=pctx.extension(website, config),
+ vars=config.sitevars())
env = config.templateenv()
template = env.get_template(tname)
fp = open(os.path.join(config.destination(), pctx.finalname()), 'w')
M muyhomepage2/app/configuration.py +3 -0
@@ 86,3 86,6 @@ class Config(object):
def atom_id_base(self):
return self._get('site', 'id_base', 'tag:my-site')
+ def sitevars(self):
+ return dict(self._list('sitevars'))
+
M muyhomepage2/pagehandlers/blog.py +7 -1
@@ 6,6 6,12 @@ from muyhomepage2 import page
from muyhomepage2 import util
+class BlogEntryHandler(standard.StandardHandler):
+ def link_ref(self):
+ link = './%s' % self.finalname()
+ return link
+
+
class BlogHandler(handler.PageHandler):
def content(self):
return wikirst.format(self.page.body)
@@ 17,7 23,7 @@ class BlogHandler(handler.PageHandler):
def wrap(pg):
if not hasattr(pg, 'body'):
pg = page.parse(pg.filename)
- return standard.StandardHandler(pg)
+ return BlogEntryHandler(pg)
entries, days = [], []
for entry in website.newest(config.blog_count()):
day = entry.created().dayfmt()
M skins/default/base.html +1 -1
@@ 18,7 18,7 @@
</head>
<body>
<div id="page-intro">
- <h1><a href="http://asynchrono.us">
+ <h1><a href="{{vars.home}}">
Birch Street Computing - {% block vistitle %}{% endblock %}
</a></h1>
</div>
M skins/default/blog.html +1 -1
@@ 14,7 14,7 @@
<h4 class="dateline">{{dateline}}</h4>
{% endif %}
<div>
- <h2>{{entry.page.title}}</h2>
+ <h2><a href="{{entry.link_ref()}}" class="topage">{{entry.page.title}}</a></h2>
{{ components.tagicon(entry, config) }}
<div></div>
<div class="written-text">