]> git.ipfire.org Git - ipfire.org.git/commitdiff
blog: Make unpublished posts render again
authorMichael Tremer <michael.tremer@ipfire.org>
Sun, 26 Jan 2020 21:29:54 +0000 (21:29 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Sun, 26 Jan 2020 21:29:54 +0000 (21:29 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/templates/blog/post.html

index 54a3eb78d9f2c91f90fe16fdeb3790895ec0abf0..210617e8f6b0e14d09e43e8150bdbd6ab9edc7d7 100644 (file)
@@ -13,7 +13,9 @@
        <meta property="og:image" content="https://blog.ipfire.org/{{ static_url("img/ipfire-tux.png") }}" />
 
        <meta property="og:type" content="article" />
-       <meta property="og:article:published_time" content="{{ post.published_at.isoformat() }}" />
+       {% if post.published_at %}
+               <meta property="og:article:published_time" content="{{ post.published_at.isoformat() }}" />
+       {% end %}
        <meta property="og:article:modified_time" content="{{ post.updated_at.isoformat() }}" />
        {% if isinstance(post.author, accounts.Account) %}
                <meta property="og:article:author:first_name" content="{{ post.author.first_name }}" />