Skip to content

Commit

Permalink
🎨 Adds video_url support
Browse files Browse the repository at this point in the history
Signed-off-by: Jeff Triplett <jeff.triplett@gmail.com>
  • Loading branch information
jefftriplett committed Sep 6, 2017
1 parent 7565066 commit 4de0c3c
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 21 deletions.
4 changes: 4 additions & 0 deletions _includes/youtube-embed-head.html
@@ -0,0 +1,4 @@
<meta property="twitter:card" content="twitter:card" />
<meta property="twitter:player:width" content="640" />
<meta property="twitter:player:height" content="385" />
<meta property="twitter:player:stream" content="https://www.youtube.com/embed/{{ include.id }}" />
3 changes: 3 additions & 0 deletions _includes/youtube-embed.html
@@ -0,0 +1,3 @@
<div class="embed">
<iframe width="640" height="385" src="https://www.youtube.com/embed/{{ include.id }}" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>
</div>
26 changes: 5 additions & 21 deletions _layouts/base.html
Expand Up @@ -5,14 +5,13 @@
<meta http-equiv="x-ua-compatible" content="ie=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
{% seo %}
{% comment %}
<title>{{ page.title }} - {{ site.name }}</title>
<meta name="description" content="{{ page.description }}" />
<meta name="keywords" content="{{ page.keywords }}, {{ site.keywords }}" />
{% endcomment %}

{% if page.video_url != blank %}
{% assign youtube_id = page.video_url | replace:"https://youtu.be/",""%}
{% include youtube-embed-head.html id=youtube_id %}
{% endif %}
<!-- Google fonts https://www.google.com/fonts
================================================== -->

<script src="https://use.typekit.net/dvm6jjh.js"></script>
<script>try{Typekit.load({ async: true });}catch(e){}</script>
<link rel="stylesheet" href="/static/css/styles.css">
Expand All @@ -22,21 +21,6 @@
<link href="/static/icons/favicon.ico" rel=icon type="image/x-icon">
<link href="/static/icons/favicon.png" rel=icon type="image/png">
<link href="/static/icons/apple-touch-icon.png" rel="apple-touch-icon-precomposed">
{% comment %}
<!-- Open Graph: https://developers.facebook.com/docs/opengraph/howtos/maximizing-distribution-media-content/
Twitter: https://dev.twitter.com/docs/cards/types/summary-card
============================== -->
<meta property="og:title" content="{{ page.title }}"/>
<meta property="og:site_name" content="{{ site.name }}"/>
<meta property="og:url" content="{{ site.url }}"/>
<meta property="og:description" content="{{ page.description }}"/>
<meta property="og:image" content="{{ page.imageurl }}"/>
<meta name="twitter:card" content="summary">
<meta name="twitter:site" content="@{{ site.twitter }}">
<meta name="twitter:title" content="{{ page.title }}">
<meta name="twitter:description" content="{{ page.description }}">
<meta name="twitter:image" content="{{ page.imageurl }}">
{% endcomment %}
</head>
<body class="{{ page.layout }}-page">
{% include social-icons.html %}
Expand Down
6 changes: 6 additions & 0 deletions _layouts/session-details.html
Expand Up @@ -50,6 +50,12 @@ <h2 class="event-links-heading">Resources</h2>
{% endif %}
</section>
{% endif %}

{% if page.video_url != blank %}
{% assign youtube_id = page.video_url | replace:"https://youtu.be/",""%}
{% include youtube-embed.html id=youtube_id %}
{% endif %}

<h2>About This {{ page.category | capitalize }}</h2>
{{ content }}
</div>
Expand Down

0 comments on commit 4de0c3c

Please sign in to comment.