Browse Source

add support for OpenGraph, and twitter cards...

main
John-Mark Gurney 2 years ago
parent
commit
579cea84ca
4 changed files with 21 additions and 0 deletions
  1. +2
    -0
      content/index.html
  2. BIN
      content/media/images/embarcadero.jpg
  3. +4
    -0
      gennext.sh
  4. +15
    -0
      layout/base.j2

+ 2
- 0
content/index.html View File

@@ -2,6 +2,8 @@
title: BaySec
description: San Francisco Security Meetup Information Page
extends: listing.j2
image: /media/images/embarcadero.jpg
imagealt: Embarcadero Center at night lit up, with water and a ferry in front
default_block: test
listable: false
---


BIN
content/media/images/embarcadero.jpg View File

Before After
Width: 800  |  Height: 800  |  Size: 372KB

+ 4
- 0
gennext.sh View File

@@ -32,6 +32,10 @@ esac
cat <<EOF > "$dir/$(date -j -r $gensecs +"%Y-%m-%d")-$(date -j -r $esecs +"%B").html"
---
title: "Next BaySec: $(date -j -r $esecs +'%B %e'$ending', %Y')"
twittertitle: BaySec - $(date -j -r $esecs +'%B %e'$ending', %Y')
description: Baysec will be at the Patriot House Pub in SF, starting at 7 pm and usually ending some time after 10 pm.
twitterlabel1: Event
twitterdata1: $(date -j -r $esecs +'%B %e'$ending', %Y')
layout: patriothouse
event_summary: Baysec
event_timezone: $TZ


+ 15
- 0
layout/base.j2 View File

@@ -20,6 +20,21 @@
compatibility mode is within the first 1K bytes
code.google.com/p/chromium/issues/detail?id=23003 -->

<!-- Twitter cards, OpenGraph and Slack unfurling -->
<meta name="twitter:card" content="summary" />
{% if resource.meta.twittertitle %}
<meta property="og:title" content="{{ resource.meta.twittertitle }}" />
{% else %}
<meta property="og:title" content="{{ resource.meta.title }}" />
{% endif %}
<meta property="og:description" content="{{ resource.meta.description }}" />
{% if resource.meta.image %} <meta property="og:image" content="{{ resource.meta.image }}" />{% endif %}
{% if resource.meta.imagealt %} <meta name="twitter:image:alt" content="{{ resource.meta.imagealt }}" />{% endif %}
{% if resource.meta.twitterlabel1 %} <meta name="twitter:label1" content="{{ resource.meta.twitterlabel1 }}" />{% endif %}
{% if resource.meta.twitterlabel2 %} <meta name="twitter:label2" content="{{ resource.meta.twitterlabel2 }}" />{% endif %}
{% if resource.meta.twitterdata1 %} <meta name="twitter:data1" content="{{ resource.meta.twitterdata1 }}" />{% endif %}
{% if resource.meta.twitterdata2 %} <meta name="twitter:data2" content="{{ resource.meta.twitterdata2 }}" />{% endif %}

<title>{% block title %}{{ resource.meta.title }}{% endblock %}</title>
<meta name="description" content="{{ resource.meta.description }}">
<meta name="author" content="{{ resource.meta.author }}">


Loading…
Cancel
Save