Skip to content

Commit 200f8eb

Browse files
fix(blog): guard against deleted authors
1 parent 7435162 commit 200f8eb

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

html-templates/blog/blogPost.tpl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@
1717

1818
<meta property="article:published_time" content="{date($.const.DATE_W3C, $Post->Published)}" />
1919

20-
<meta property="article:author" content="{absolute_url $Post->Author->getURL()}" />
20+
{if $Post->Author}
21+
<meta property="article:author" content="{absolute_url $Post->Author->getURL()}" />
22+
{/if}
2123

2224
<meta name="twitter:card" content="summary" />
2325
<meta name="twitter:title" content="{$Post->Title|escape}" />

html-templates/subtemplates/blog.tpl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@
1111
{if $showHeader}
1212
<header class="post-header">
1313
<{$headingLevel} class="post-title">
14-
<a class="pull-right" href="{$Post->Author->getURL()}" data-toggle="tooltip" title="{personName $Post->Author}">{avatar $Post->Author size=64}</a>
14+
{if $Post->Author}
15+
<a class="pull-right" href="{$Post->Author->getURL()}" data-toggle="tooltip" title="{personName $Post->Author}">{avatar $Post->Author size=64}</a>
16+
{/if}
1517
<a href="{$Post->getURL()}">{$Post->Title|escape}</a>
1618
</{$headingLevel}>
1719
</header>

0 commit comments

Comments
 (0)