Browse Source

Add basic opengraph card

master
parent
commit
6276bf15bc
  1. 2
      sigal.conf.py
  2. 2
      sigal.dev.conf.py
  3. 3
      theme/templates/base.html
  4. 3
      theme/templates/media.html

2
sigal.conf.py

@ -260,3 +260,5 @@ plugins = ['plugins.media_page']
# compress_assets_options = {
# 'method': 'gzip' # Or 'zopfli' or 'brotli'
# }
base_url = 'https://bksp.space/photos/'

2
sigal.dev.conf.py

@ -260,3 +260,5 @@ plugins = ['plugins.media_page']
# compress_assets_options = {
# 'method': 'gzip' # Or 'zopfli' or 'brotli'
# }
base_url = 'https://bksp.space/photos/'

3
theme/templates/base.html

@ -3,6 +3,9 @@
<head>
<meta charset="utf-8">
<meta name="author" content="{{ album.author }}">
<meta property="og:site_name" content="{{ index_title }}">
<meta property="og:title" content="{{ album.title|striptags }}">
<title>{{ album.title|striptags }}</title>
<link rel="stylesheet" href="{{ theme.url }}/css/main.css">

3
theme/templates/media.html

@ -3,6 +3,9 @@
{% block extra_head %}
<link rel="stylesheet" href="{{ theme.url }}/css/media.css">
<link rel="stylesheet" href="{{ theme.url }}/fork-awesome/css/fork-awesome.min.css">
<meta property="og:image" content="{{ settings.base_url }}{{ media.path|urlencode }}/{{ media.url }}">
<meta property="og:url" content="{{ settings.base_url }}{{ media.path|urlencode }}/{{ media.url }}.html">
<meta name="twitter:card" content="summary_large_image">
{% endblock %}
{% block extra_breadcrumb %}

Loading…
Cancel
Save