Skip to content

Commit b8472fe

Browse files
committed
Add twitter card meta tags
1 parent 529f9ff commit b8472fe

4 files changed

Lines changed: 40 additions & 31 deletions

File tree

Content/style.css

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,4 @@
1-
/*!
2-
* Copyright 2013 Twitter, Inc.
3-
*
4-
* Licensed under the Creative Commons Attribution 3.0 Unported License. For
5-
* details, see http://creativecommons.org/licenses/by/3.0/.
6-
*/
7-
8-
body {
1+
body {
92
position: relative;
103
padding-top: 50px;
114
}

_includes/navigation.html

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,16 @@
55
</button>
66
<div class="collapse navbar-collapse" id="navbarNav">
77
<ul class="navbar-nav mr-auto">
8-
{% assign mypages = site.pages | sort: "order" %}
9-
{% for page in mypages %}
10-
{% if page.order != null %}
11-
<li class="nav-item"><a class="nav-link" href="{{ page.url | relative_url }}">{{ page.title }}</a></li>
8+
{% assign nodes = site.pages | sort: "order" %}
9+
{% for node in nodes %}
10+
{% if node.order != null %}
11+
{% if page.url == node.url %}
12+
<li class="active nav-item"><a class="nav-link" href="{{ node.url | relative_url }}">{{ node.title }}</a></li>
13+
{% else %}
14+
<li class="nav-item"><a class="nav-link" href="{{ node.url | relative_url }}">{{ node.title }}</a></li>
15+
{% endif %}
1216
{% endif %}
13-
{% endfor %}
17+
{% endfor %}
1418
<li class="nav-item">
1519
<a class="nav-link" href="https://twitter.com/c4fsharp" target="_blank" rel="noopener" style="color:fff">
1620
<span class="icon">

_layouts/default.html

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,26 +4,32 @@
44
<meta charset="utf-8" />
55
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
66
<title>{{ page.title }} | {{ site.title }}</title>
7-
<link rel="manifest" href="{{ manifest.json | relative_url }}">
8-
<link rel="icon" sizes="192x192" href="{{ favicon-192x192.png | relative_url }}">
9-
<link rel="apple-touch-icon" href="{{ apple-touch-icon.png | relative_url }}">
10-
<link rel="shortcut icon" href="{{ favicon.ico | relative_url }}">
11-
<meta name="msapplication-square150x150logo" content="{{ ms-icon-150x150.png | absolute_url }}">
12-
<meta name="msapplication-config" content="{{ browserconfig.xml | absolute_url }}">
7+
<link rel="manifest" href="{{ 'manifest.json' | relative_url }}">
8+
<link rel="icon" sizes="192x192" href="{{ 'favicon-192x192.png' | relative_url }}">
9+
<link rel="apple-touch-icon" href="{{ 'apple-touch-icon.png' | relative_url }}">
10+
<link rel="shortcut icon" href="{{ 'favicon.ico' | relative_url }}">
11+
<meta name="msapplication-square150x150logo" content="{{ 'ms-icon-150x150.png' | absolute_url }}">
12+
<meta name="msapplication-config" content="{{ 'browserconfig.xml' | absolute_url }}">
1313
<meta name="msapplication-TileColor" content="#F99D25">
1414
<meta name="theme-color" content="#F99D25">
1515
<link rel="stylesheet" href="//cdn.usebootstrap.com/bootstrap/4.3.1/css/bootstrap.min.css" />
1616
<link rel="stylesheet" href="//kit-free.fontawesome.com/releases/latest/css/free.min.css" media="all" />
1717
<link rel="stylesheet" href="//kit-free.fontawesome.com/releases/latest/css/free-v4-shims.min.css" media="all" />
18-
<link rel="stylesheet" href="{{ Content/style.css | relative_url }}" />
19-
<link rel="stylesheet" href="{{ Content/pygment_trac.min.css | relative_url }}" />
18+
<link rel="stylesheet" href="{{ 'Content/style.css' | relative_url }}" />
19+
<link rel="stylesheet" href="{{ 'Content/pygment_trac.min.css' | relative_url }}" />
2020
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no" />
2121
<meta name="description" content="{{ site.description }}" />
2222
<meta property="og:title" content="{{ page.title }}">
2323
<meta property="og:description" content="{{ page.summary }}">
24-
<meta property="og:image" content="{{ favicon.ico | absolute_url }}">
24+
<meta property="og:image" content="{{ 'favicon-512x512.png' | absolute_url }}">
2525
<meta property="og:url" content="{{ page.url | absolute_url }}">
2626
<meta property="og:site_name" content="Community for F#">
27+
<meta property="twitter:card" content="summary_large_image">
28+
<meta property="twitter:site" content="@c4fsharp">
29+
<meta property="twitter:creator" content="@panesofglass">
30+
<meta property="twitter:title" content="{{ page.title }}">
31+
<meta property="twitter:description" content="{{ page.summary }}">
32+
<meta property="twitter:image" content="{{ 'favicon-512x512.png' | absolute_url }}">
2733
<script>
2834
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
2935
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),

_layouts/home.html

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,26 +4,32 @@
44
<meta charset="utf-8" />
55
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
66
<title>{{ page.title }} | {{ site.title }}</title>
7-
<link rel="manifest" href="{{ manifest.json | relative_url }}">
8-
<link rel="icon" sizes="192x192" href="{{ favicon-192x192.png | relative_url }}">
9-
<link rel="apple-touch-icon" href="{{ apple-touch-icon.png | relative_url }}">
10-
<link rel="shortcut icon" href="{{ favicon.ico | relative_url }}">
11-
<meta name="msapplication-square150x150logo" content="{{ ms-icon-150x150.png | absolute_url }}">
12-
<meta name="msapplication-config" content="{{ browserconfig.xml | absolute_url }}">
7+
<link rel="manifest" href="{{ 'manifest.json' | relative_url }}">
8+
<link rel="icon" sizes="192x192" href="{{ 'favicon-192x192.png' | relative_url }}">
9+
<link rel="apple-touch-icon" href="{{ 'apple-touch-icon.png' | relative_url }}">
10+
<link rel="shortcut icon" href="{{ 'favicon.ico' | relative_url }}">
11+
<meta name="msapplication-square150x150logo" content="{{ 'ms-icon-150x150.png' | absolute_url }}">
12+
<meta name="msapplication-config" content="{{ 'browserconfig.xml' | absolute_url }}">
1313
<meta name="msapplication-TileColor" content="#F99D25">
1414
<meta name="theme-color" content="#F99D25">
1515
<link rel="stylesheet" href="//cdn.usebootstrap.com/bootstrap/4.3.1/css/bootstrap.min.css" />
1616
<link rel="stylesheet" href="//kit-free.fontawesome.com/releases/latest/css/free.min.css" media="all" />
1717
<link rel="stylesheet" href="//kit-free.fontawesome.com/releases/latest/css/free-v4-shims.min.css" media="all" />
18-
<link rel="stylesheet" href="{{ Content/style.css | relative_url }}" />
19-
<link rel="stylesheet" href="{{ Content/pygment_trac.min.css | relative_url }}" />
18+
<link rel="stylesheet" href="{{ 'Content/style.css' | relative_url }}" />
19+
<link rel="stylesheet" href="{{ 'Content/pygment_trac.min.css' | relative_url }}" />
2020
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no" />
2121
<meta name="description" content="{{ site.description }}" />
2222
<meta property="og:title" content="{{ page.title }}">
2323
<meta property="og:description" content="{{ page.summary }}">
24-
<meta property="og:image" content="{{ favicon.ico | absolute_url }}">
24+
<meta property="og:image" content="{{ 'favicon-512x512.png' | absolute_url }}">
2525
<meta property="og:url" content="{{ page.url | absolute_url }}">
2626
<meta property="og:site_name" content="Community for F#">
27+
<meta property="twitter:card" content="summary_large_image">
28+
<meta property="twitter:site" content="@c4fsharp">
29+
<meta property="twitter:creator" content="@panesofglass">
30+
<meta property="twitter:title" content="{{ page.title }}">
31+
<meta property="twitter:description" content="{{ page.summary }}">
32+
<meta property="twitter:image" content="{{ 'favicon-512x512.png' | absolute_url }}">
2733
<script>
2834
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
2935
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),

0 commit comments

Comments
 (0)