Hi,
First of all, a big thank-you to this wonderful project.
I have a question about putting custom attributes into the YAML header for posts.
I would like to add a "showcase" attribute to header like so:
---
categories: General Stuff
date: 2010/06/29 15:25:00
title: Filler post 1
showcase: "An image URL"
---
I want to then use it in a post excerpt (post_excerpt.mako).
I've enabled the excerpt flag and the excerpt function is working.
I want to use the "showcase" attribute as an image source for SOME of the posts, not all of them.
My post_excerpt.mako is as follows:
<%inherit file="post.mako" />
<%def name="post_prose(post)">
${post.excerpt}
</%def>
I tried this:
<%inherit file="post.mako" />
<%def name="post_prose(post)">
% if excerpt in post:
${post.excerpt}
% else:
${post.content}
$ endif
</%def>
but it is giving me an error that finally ends in:
mako.exceptions.SyntaxException: Unterminated control keyword: 'if' in file '_templates/blog/post_excerpt.mako' at line: 3 char: 1
I'm not very fluent with Python nor Mako but I do understand the basic syntax,
Any pointer in the right direction will be tremendously helpful.
Thanks!
CCH