fuck html templating

This commit is contained in:
Matthew Connelly 2015-03-08 23:05:18 +00:00
parent f58a8dfb8f
commit b5445cf28d
2 changed files with 2 additions and 2 deletions

View File

@ -41,7 +41,7 @@ sub readpost {
$postm{body} = markdown($postb); undef $postb;
if (defined $postm{date}) {
$postm{slug} = slugify($postm{title}) unless $postm{slug}; #we allow custom slugs to be defined
$postm{hastags} = (defined $postm{tags} and length $postm{tags})? 1 : 0;
$postm{hastags} = (defined $postm{tags}? 1 : 0);
$postm{excerpt} = $1 if $postm{body} =~ /(<p>.*?<\/p>)/s;
$postm{time} = str2time($postm{date});
$postm{datetime} = timefmt($postm{date},'datetime');

View File

@ -51,7 +51,7 @@
<TMPL_IF NAME="ISPOST">
<li><h3 class="highlight">This Post</h3></li>
<li>Published: <TMPL_VAR NAME="fancy"></li>
<TMPL_IF NAME="HASTAGS">
<TMPL_IF NAME="hastags">
<li>Tags: <TMPL_VAR NAME="tags"></li>
</TMPL_IF>
</TMPL_IF>