]> git.ipfire.org Git - ipfire.org.git/blame - src/templates/blog/post.html
blog: Make unpublished posts render again
[ipfire.org.git] / src / templates / blog / post.html
CommitLineData
12e5de7e
MT
1{% extends "base.html" %}
2
3{% block title %}{{ post.title }}{% end block %}
4
4203b8c0
MT
5{% block meta %}
6 {% import ipfire.accounts as accounts %}
7
8 <!-- Facebook OpenGraph -->
9 <meta property="og:site_name" content="IPFire Blog" />
10 <meta property="og:title" content="{{ post.title }} - The IPFire Blog" />
11 <meta property="og:description" content="{{ post.excerpt }}" />
12 <meta property="og:url" content="{{ request.full_url() }}" />
13 <meta property="og:image" content="https://blog.ipfire.org/{{ static_url("img/ipfire-tux.png") }}" />
14
15 <meta property="og:type" content="article" />
cb2cb985
MT
16 {% if post.published_at %}
17 <meta property="og:article:published_time" content="{{ post.published_at.isoformat() }}" />
18 {% end %}
4203b8c0
MT
19 <meta property="og:article:modified_time" content="{{ post.updated_at.isoformat() }}" />
20 {% if isinstance(post.author, accounts.Account) %}
21 <meta property="og:article:author:first_name" content="{{ post.author.first_name }}" />
22 <meta property="og:article:author:last_name" content="{{ post.author.last_name }}" />
23 <meta property="og:article:author:username" content="{{ post.author.uid }}" />
24 {% end %}
25 {% for tag in post.tags %}
26 <meta property="og:article:tag" content="{{ tag }}" />
27 {% end %}
28
29 <!-- Twitter -->
30 <meta property="twitter:site" content="@ipfire" />
31 <meta property="twitter:card" content="summary_large_image" />
32 <meta property="twitter:title" content="{{ post.title }} - The IPFire Blog" />
33 <meta property="twitter:description" content="{{ post.excerpt }}" />
34 <meta property="twitter:image" content="https://blog.ipfire.org/{{ static_url("img/ipfire-tux.png") }}" />
35{% end block %}
36
12e5de7e
MT
37{% block main %}
38 <div class="card">
f91dfcc7
MT
39 <div class="card-body">
40 {% module BlogPost(post) %}
12e5de7e
MT
41 </div>
42 </div>
43{% end block %}