Browse Source

Add some basic Open Graph meta tags

This should allow for some basic embeds to be displayed in
Slack/Discord/Twitter/etc. when people link to Tildes urls. This should
definitely be enhanced by adding things like descriptions to pages where
that's relevant, but it's a reasonable start.
merge-requests/64/head
Deimos 6 years ago
parent
commit
952b97f2a1
  1. BIN
      tildes/static/images/tildes-logo-144x144.png
  2. 7
      tildes/tildes/templates/base.jinja2

BIN
tildes/static/images/tildes-logo-144x144.png

After

Width: 144  |  Height: 144  |  Size: 1002 B

7
tildes/tildes/templates/base.jinja2

@ -11,6 +11,13 @@
<meta name="intercoolerjs:use-data-prefix" content="true">
<meta name="csrftoken" content="{{ get_csrf_token() }}">
<meta property="og:image" content="/images/tildes-logo-144x144.png">
<meta property="og:site_name" content="Tildes">
<meta property="og:type" content="website">
{% block meta_og_tags %}
<meta property="og:title" content="{{ self.title() }}">
{% endblock %}
{# Hardcoding each option isn't great, but I don't know a better method #}
{% if request.cookies.get('theme', '') == 'dark' %}
<meta name="theme-color" content="#073642">

Loading…
Cancel
Save