]> git.ipfire.org Git - ipfire.org.git/blame - src/templates/wiki/page.html
wiki: Add meta tags for OpenGraph & Twitter
[ipfire.org.git] / src / templates / wiki / page.html
CommitLineData
181d08f3
MT
1{% extends "base.html" %}
2
3{% block title %}{{ page.title }}{% end block %}
4
091ac36b 5{% block sidebar %}
116d1825 6 {% if page and page.sidebar %}
5bc36cbd 7 <div class="wiki-content small">
a9bb7761
MT
8 {% raw page.sidebar.html %}
9 </div>
091ac36b
MT
10 {% end %}
11{% end block %}
12
438bab7a
MT
13{% block head %}
14 <!-- Facebook OpenGraph -->
15 <meta property="og:site_name" content="IPFire Wiki" />
16 <meta property="og:title" content="{{ page.title }} - The IPFire Wiki" />
17 <meta property="og:url" content="{{ page.full_url }}" />
18 <meta property="og:image" content="https://wiki.ipfire.org/{{ static_url("img/ipfire-tux.png") }}" />
19
20 <meta property="og:type" content="article" />
21 <meta property="og:article:modified_time" content="{{ page.timestamp.isoformat() }}" />
22
23 <!-- Twitter -->
24 <meta property="twitter:site" content="@ipfire" />
25 <meta property="twitter:card" content="summary_large_image" />
26 <meta property="twitter:title" content="{{ page.title }} - The IPFire Wiki" />
27 <meta property="twitter:image" content="https://wiki.ipfire.org/{{ static_url("img/ipfire-tux.png") }}" />
28{% end block %}
29
181d08f3 30{% block main %}
3c8524b4
MT
31 {% import os.path %}
32
3b05ef6e 33 <div class="card mb-3">
9bc17e85 34 <div class="card-body wiki-content">
321c58c3 35 {% raw page.html %}
181d08f3
MT
36 </div>
37 </div>
3b05ef6e 38
3c8524b4 39 <a class="btn btn-primary btn-block mb-3" href="{{ os.path.join(request.path, "_edit") }}">
3b544235
MT
40 <span class="fas fa-edit mr-2"></span> {{ _("Edit Page") }}
41 {% if not current_user %}&dash; {{ _("Yes, you can edit!") }}{% end %}
42 </a>
1711b8f8 43
8622aa51 44 <p class="small text-muted">
d64a1e35 45 {% if current_user %}
f2e25ded 46 {% if page.is_watched_by(current_user) %}
3c8524b4 47 <a href="{{ os.path.join(page.url, "_unwatch") }}"><span class="fas fa-star" title="{{ _("Stop watching this page") }}"></span></a>
d64a1e35 48 {% else %}
3c8524b4 49 <a href="{{ os.path.join(page.url, "_watch") }}"><span class="far fa-star" title="{{ _("Watch this page") }}"></span></a>
d64a1e35
MT
50 {% end %} &bull;
51 {% end %}
52
53 <a href="{{ request.path }}?action=revisions">
54 {{ _("Older Revisions") }}
55 </a>
3b05ef6e 56
d64a1e35 57 &bull;
3b05ef6e 58
7d9f7332 59 {{ locale.format_date(page.timestamp) }}
1711b8f8 60
d64a1e35
MT
61 {% if page.author %}
62 &bull;
63
64 <a href="/users/{{ page.author.uid }}">
65 {{ page.author }}
66 </a>
67 {% end %}
68 </p>
181d08f3 69{% end block %}