fuck html templating
This commit is contained in:
parent
f58a8dfb8f
commit
b5445cf28d
2
blogalba
2
blogalba
|
@ -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');
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Reference in New Issue