on master help sign in
Feature: Twitter cards
commit29566b426620acec52e3bc808687424866386a03 authorMatilde Park <matilde@tlon.io> dateMon 21 Oct 2019, 09:17 (7 years ago) parent5df5e28
15 files changed+148−35
templates/404.html+8−1 templates/base.html+7−8 templates/doc.html+8−1 templates/essays/list.html+11−1 templates/essays/post.html+12−3 templates/index.html+8−2 templates/list.html+9−1 templates/media/list.html+10−1 templates/page.html+13−5 templates/page_indiced.html+13−5 templates/sections/docs.html+8−1 templates/sections/docs/chapters.html+8−1 templates/understanding-urbit/list.html+10−1 templates/understanding-urbit/post.html+13−3 templates/updates/list.html+10−1
templates/404.html+8−1
@@ -1,5 +1,12 @@
11{% extends "base.html" %}
2−{% block title %} 404 {% endblock title %}
2+{% block title %}
3+ <meta name="og:title" content="404 - {{ config.title }}">
4+ <title>404 - {{ config.title }}</title>
5+{% endblock title %}
6+{% block description %}
7+ <meta name="og:description" content="Content not found.">
8+ <meta name="description" content="Content not found.">
9+{% endblock description %}
310{% block content %}
411<nav class="mt4 w5">
512 <a class="gray3" href="/">Urbit</a>
templates/base.html+7−8
@@ -5,12 +5,13 @@
55 <meta charset="UTF-8">
66 <meta name="apple-mobile-web-app-capable" content="yes">
77 <meta name="viewport" content="width=device-width">
8− <!-- TWITTER -->
9− <meta name="twitter:card" content="summary_large_image">
10− <meta name="twitter:site" content="@urbit">
11− <meta name="twitter:creator" content="@urbit">
12− <!-- END TWITTER -->
13− <meta name="description" content="{% block description %}{% endblock description %}">
8+ <meta name="twitter:card" content="summary_large_image">
9+ <meta name="twitter:site" content="@urbit">
10+ <meta name="twitter:creator" content="@urbit">
11+ {% block title %}
12+ {% endblock title %}
13+ {% block description %}
14+ {% endblock description %}
1415 <meta name="author" content="{{ config.extra.author.name }}">
1516 <!-- END META -->
1617
@@ -22,8 +23,6 @@
2223 <link rel="alternative" type="application/rss+xml" title="RSS" href="/rss.xml" />
2324 <!-- END RSS -->
2425
25− <title>{% block title %}{% endblock title %} - {{ config.title }}</title>
26−
2726 <!-- START CSS -->
2827 <link href="//cdn-images.mailchimp.com/embedcode/horizontal-slim-10_7.css" rel="stylesheet" type="text/css">
2928 <style type="text/css">
templates/doc.html+8−1
@@ -1,5 +1,12 @@
11{% extends "base.html" %}
2−{% block title %} {{ page.title }} {% endblock title %}
2+{% block title %}
3+ <meta name="og:title" content="{{ page.title }} - {{ config.title }}">
4+ <title>{{ page.title }} - {{ config.title }}</title>
5+{% endblock title %}
6+{% block description %}
7+ <meta name="og:description" content="From the Urbit documentation.">
8+ <meta name="description" content="From the Urbit documentation.">
9+{% endblock description %}
310{% block bodyclasses %} class="docs" {% endblock bodyclasses %}
411{% block content %}
512<!-- header -->
templates/essays/list.html+11−1
@@ -1,5 +1,15 @@
11{% extends "base.html" %}
2−{% block title %} Blog {% endblock title %}
2+
3+{% block title %}
4+ <meta name="og:title" content="Blog - {{ config.title }}">
5+ <title>Blog - {{ config.title }}</title>
6+{% endblock title %}
7+
8+{% block description %}
9+ <meta name="og:description" content="Directory for the Urbit Blog.">
10+ <meta name="description" content="Directory for the Urbit Blog.">
11+{% endblock description %}
12+
313{% block content %}
414<!-- header -->
515<nav class="mt4 full fourth-1-lg mb3 mb0-m mb0-l mb0-xl">
templates/essays/post.html+12−3
@@ -1,9 +1,18 @@
11{% extends "base.html" %}
2−{% block title %}
3− {{ page.title }}
2+{% block title %}
3+ <meta name="og:title" content="{{ page.title }} - {{ config.title }}">
4+ <title>{{ page.title }} - {{ config.title }}</title>
45{% endblock title %}
56
6−{% block description %} {{ page.description }} {% endblock description %}
7+{% block description %}
8+ {% if page.description %}
9+ <meta name="og:description" content="{{ page.description }}">
10+ <meta name="description" content="{{ page.description }}">
11+ {% else %}
12+ <meta name="og:description" content="{{ config.description }}">
13+ <meta name="description" content="{{ config.description }}">
14+ {% endif %}
15+{% endblock description %}
716
817{% block bodyclasses %}
918 class="essay
templates/index.html+8−2
@@ -6,8 +6,14 @@
66
77{% block bodyclasses %}class="index"{% endblock bodyclasses %}
88
9−{% block title %} {{ section.title }} {% endblock title %}
10−
9+{% block title %}
10+ <meta name="og:title" content="{{ section.title }} - {{ config.title }}">
11+ <title>{{ section.title }} - {{ config.title }}</title>
12+{% endblock title %}
13+{% block description %}
14+ <meta name="og:description" content="Urbit is your last computer. It's is a simple, durable computer that you own 100% and forever.">
15+ <meta name="description" content="Urbit is your last computer. It's is a simple, durable computer that you own 100% and forever.">
16+{% endblock description %}
1117{% block content %}
1218
1319<section class="full p0 vid-insert-wrap full-bleed">
templates/list.html+9−1
@@ -1,5 +1,13 @@
11{% extends "base.html" %}
2−{% block title %} {{ section.title }} {% endblock title %}
2+{% block title %}
3+ <meta name="og:title" content="{{ section.title }} - {{ config.title }}">
4+ <title>{{ section.title }} - {{ config.title }}</title>
5+{% endblock title %}
6+{% block description %}
7+ <meta name="og:description" content="Directory for {{ section.title }}.">
8+ <meta name="description" content="Directory for {{ section.title }}.">
9+{% endblock description %}
10+
311{% block content %}
412<!-- header -->
513<nav class="mt4 full fourth-1-lg mb3 mb0-m mb0-l mb0-xl">
templates/media/list.html+10−1
@@ -1,5 +1,14 @@
11{% extends "base.html" %}
2−{% block title %} Media {% endblock title %}
2+{% block title %}
3+ <meta name="og:title" content="Media - {{ config.title }}">
4+ <title>Media - {{ config.title }}</title>
5+{% endblock title %}
6+
7+{% block description %}
8+ <meta name="og:description" content="A curated list of Urbit-related media.">
9+ <meta name="description" content="A curated list of Urbit-related media.">
10+{% endblock description %}
11+
312{% block content %}
413<!-- header -->
514<nav class="mt4 full fourth-1-lg mb3 mb0-m mb0-l mb0-xl">
templates/page.html+13−5
@@ -1,12 +1,20 @@
11{% extends "base.html" %}
2−{% block title %} {{ page.title }} {% endblock title %}
2+
3+{% block title %}
4+ <meta name="og:title" content="{{ page.title }} - {{ config.title }}">
5+ <title>{{ page.title }} - {{ config.title }}</title>
6+{% endblock title %}
7+
38{% block description %}
49 {% if page.description %}
5− {{ page.description }}
10+ <meta name="og:description" content="{{ page.description }}">
11+ <meta name="description" content="{{ page.description }}">
612 {% else %}
7− {{ config.description }}
8− {% endif %}
9− {% endblock description %}
13+ <meta name="og:description" content="{{ config.description }}">
14+ <meta name="description" content="{{ config.description }}">
15+ {% endif %}
16+{% endblock description %}
17+
1018{% block content %}
1119
1220<!-- header -->
templates/page_indiced.html+13−5
@@ -1,13 +1,21 @@
11{% extends "base.html" %}
2−{% block title %} {{ page.title }} {% endblock title %}
32{% block bodyclasses %}class="page-indiced"{% endblock bodyclasses %}
3+
4+{% block title %}
5+ <meta name="og:title" content="{{ page.title }} - {{ config.title }}">
6+ <title>{{ page.title }} - {{ config.title }}</title>
7+{% endblock title %}
8+
49{% block description %}
510 {% if page.description %}
6− {{ page.description }}
11+ <meta name="og:description" content="{{ page.description }}">
12+ <meta name="description" content="{{ page.description }}">
713 {% else %}
8− {{ config.description }}
9− {% endif %}
10− {% endblock description %}
14+ <meta name="og:description" content="{{ config.description }}">
15+ <meta name="description" content="{{ config.description }}">
16+ {% endif %}
17+{% endblock description %}
18+
1119{% block content %}
1220
1321<!-- header -->
templates/sections/docs.html+8−1
@@ -1,5 +1,12 @@
11{% extends "base.html" %}
2−{% block title %} {{ section.title }} {% endblock title %}
2+{% block title %}
3+ <meta name="og:title" content="{{ section.title }} - {{ config.title }}">
4+ <title>{{ section.title }} - {{ config.title }}</title>
5+{% endblock title %}
6+{% block description %}
7+ <meta name="og:description" content="From the Urbit documentation.">
8+ <meta name="description" content="From the Urbit documentation.">
9+{% endblock description %}
310{% block bodyclasses %} class="docs" {% endblock bodyclasses %}
411{% block content %}
512<!-- header -->
templates/sections/docs/chapters.html+8−1
@@ -1,5 +1,12 @@
11{% extends "base.html" %}
2−{% block title %} {{ section.title }} {% endblock title %}
2+{% block title %}
3+ <meta name="og:title" content="{{ section.title }} - {{ config.title }}">
4+ <title>{{ section.title }} - {{ config.title }}</title>
5+{% endblock title %}
6+{% block description %}
7+ <meta name="og:description" content="From the Urbit documentation.">
8+ <meta name="description" content="From the Urbit documentation.">
9+{% endblock description %}
310{% block content %}
411<!-- header -->
512<!-- content -->
templates/understanding-urbit/list.html+10−1
@@ -1,5 +1,14 @@
11{% extends "base.html" %}
2−{% block title %} Understanding Urbit {% endblock title %}
2+{% block title %}
3+ <meta name="og:title" content="Understanding Urbit - {{ config.title }}">
4+ <title>Understanding Urbit - {{ config.title }}</title>
5+{% endblock title %}
6+
7+{% block description %}
8+ <meta name="og:description" content="Urbit is a new kind of computer.">
9+ <meta name="description" content="Urbit is a new kind of computer.">
10+{% endblock description %}
11+
312{% block content %}
413<!-- header -->
514<nav class="mt4 full fourth-1-lg mb3 mb0-m mb0-l mb0-xl absolute-xl">
templates/understanding-urbit/post.html+13−3
@@ -1,9 +1,19 @@
11{% extends "base.html" %}
2−{% block title %}
3− {{ page.title }}
2+
3+{% block title %}
4+ <meta name="og:title" content="{{ page.title }} - {{ config.title }}">
5+ <title>{{ page.title }} - {{ config.title }}</title>
46{% endblock title %}
57
6−{% block description %} {{ page.description }} {% endblock description %}
8+{% block description %}
9+ {% if page.description %}
10+ <meta name="og:description" content="{{ page.description }}">
11+ <meta name="description" content="{{ page.description }}">
12+ {% else %}
13+ <meta name="og:description" content="{{ config.description }}">
14+ <meta name="description" content="{{ config.description }}">
15+ {% endif %}
16+{% endblock description %}
717
818{% block bodyclasses %}
919 class="essay
templates/updates/list.html+10−1
@@ -1,5 +1,14 @@
11{% extends "base.html" %}
2−{% block title %} Updates {% endblock title %}
2+{% block title %}
3+ <meta name="og:title" content="Updates - {{ config.title }}">
4+ <title>Updates - {{ config.title }}</title>
5+{% endblock title %}
6+
7+{% block description %}
8+ <meta name="og:description" content="Updates on the Urbit project.">
9+ <meta name="description" content="Updates on the Urbit project.">
10+{% endblock description %}
11+
312{% block bodyclasses %}class="updates"{% endblock bodyclasses %}
413{% block content %}
514<!-- header -->