summaryrefslogtreecommitdiff
path: root/_includes
diff options
context:
space:
mode:
Diffstat (limited to '_includes')
-rw-r--r--_includes/head.liquid22
-rw-r--r--_includes/post-link.liquid2
-rw-r--r--_includes/social-share-fb.liquid19
-rw-r--r--_includes/social-share.liquid14
4 files changed, 55 insertions, 2 deletions
diff --git a/_includes/head.liquid b/_includes/head.liquid
index 57befda..5bac44f 100644
--- a/_includes/head.liquid
+++ b/_includes/head.liquid
@@ -1,4 +1,24 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
-<title>{{ page.title }}</title>
<link rel="stylesheet" href="/public/css/styles.css">
+<title>{{ page.title }}</title>
+
+<!-- Open Graph Protocol -->
+<meta property="og:site_name" content="53hornet"/>
+<meta property="og:description" content="{{ page.excerpt | truncatewords: 50 | strip_html }}"/>
+<meta property="og:type" content="article"/>
+<meta property="og:title" content="{{ page.title }}"/>
+<meta property="og:url" content="{{ "https://53hor.net/" | append: page.permalink }}"/>
+<meta property="og:image" content="https://53hor.net/public/images/logo_diag.png"/>
+<meta property="og:article:author" content="Adam Carpenter"/>
+<meta property="og:article:section" content="{{ page.categories }}"/>
+
+{% if page.published_date %}
+ <meta property="og:article:published_time" content="{{ page.published_date }}"/>
+{% endif %}
+
+{% if page.tags %}
+ {% for tag in page.tags %}
+ <meta property="og:article:tag" content="{{ tag }}"/>
+ {% endfor %}
+{% endif %}
diff --git a/_includes/post-link.liquid b/_includes/post-link.liquid
index 92548cf..adf1df1 100644
--- a/_includes/post-link.liquid
+++ b/_includes/post-link.liquid
@@ -2,7 +2,7 @@
<a href="/{{ post.permalink }}">
{% if post.published_date %}
<span class="tag">
- {{ post.published_date | date: "%e %b %Y" }}
+ {{ post.published_date | date: "%d %b %Y" }}
</span>
{% endif %}
diff --git a/_includes/social-share-fb.liquid b/_includes/social-share-fb.liquid
new file mode 100644
index 0000000..843e511
--- /dev/null
+++ b/_includes/social-share-fb.liquid
@@ -0,0 +1,19 @@
+<div id="fb-root"></div>
+<script async
+ defer
+ crossorigin="anonymous"
+ src="https://connect.facebook.net/en_US/sdk.js#xfbml=1&version=v4.0">
+</script>
+
+{% assign link = "https://53hor.net/" | append: page.permalink | escape %}
+
+<div class="button is-rounded"
+ data-href={{ link }}
+ data-layout="button_count"
+ data-size="small">
+ <a target="_blank"
+ href="https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2F53hor.net%2F&amp;src=sdkpreparse"
+ class="fb-xfbml-parse-ignore">
+ Share to Facebook
+ </a>
+</div>
diff --git a/_includes/social-share.liquid b/_includes/social-share.liquid
new file mode 100644
index 0000000..acbf29d
--- /dev/null
+++ b/_includes/social-share.liquid
@@ -0,0 +1,14 @@
+<aside class="menu">
+ <p class="menu-label has-text-centered">
+ Social Sharing
+ </p>
+
+ <nav class="level">
+ <div class="level-item has-text-centered">
+ {% include social-share-fb.liquid %}
+ </div>
+ </nav>
+
+</aside>
+
+