Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Nikola blog theme
## -*- coding: utf-8 -*-
<%inherit file="content.tmpl"/>
<%inherit file="base.tmpl"/>
<%namespace name="components" file="components.tmpl" import="*"/>
<%block name="content">
<div id="layout">
${components.navbar()}
<div id="main">
${components.html_header()}
<div class="content">
% for post in posts:
%if index_teasers:
<div class="p-summary entry-summary">
${post.text(teaser_only=True)}
%else:
<div class="e-content entry-content">
${post.text(teaser_only=False)}
%endif
</div>
</article>
% endfor
</div>
</div>
${components.html_footer()}
</div>
</%block>
########################################
TaskError - taskid:render_pages:output/stories/blog/index.html
PythonAction Error
Traceback (most recent call last):
File "/usr/local/lib/python3.4/dist-packages/doit/action.py", line 372, in execute
returned_value = self.py_callable(*self.args, **kwargs)
File "/usr/local/lib/python3.4/dist-packages/nikola/nikola.py", line 1001, in render_template
template_name, None, local_context)
File "/usr/local/lib/python3.4/dist-packages/nikola/plugins/template/mako.py", line 110, in render_template
data = template.render_unicode(**context)
File "/usr/local/lib/python3.4/dist-packages/mako/template.py", line 452, in render_unicode
as_unicode=True)
File "/usr/local/lib/python3.4/dist-packages/mako/runtime.py", line 803, in _render
**_kwargs_for_callable(callable_, data))
File "/usr/local/lib/python3.4/dist-packages/mako/runtime.py", line 835, in _render_context
_exec_template(inherit, lclcontext, args=args, kwargs=kwargs)
File "/usr/local/lib/python3.4/dist-packages/mako/runtime.py", line 860, in _exec_template
callable_(context, *args, **kwargs)
File "/var/www/disconsented/cache/.mako.tmp/base.tmpl.py", line 37, in render_body
context['self'].content(**pageargs)
File "/var/www/disconsented/cache/.mako.tmp/blog.tmpl.py", line 69, in render_content
for post in posts:
TypeError: 'Undefined' object is not iterable
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.