Add jekyll-stealthy-share

This commit is contained in:
Rob Watson 2018-01-09 07:14:58 +00:00
parent 700b841949
commit f98757adae
7 changed files with 58 additions and 2 deletions

1
.gitignore vendored
View File

@ -1,3 +1,4 @@
_site
.sass-cache
.jekyll-metadata
.byebug_history

1
.ruby-version Normal file
View File

@ -0,0 +1 @@
2.5.0

View File

@ -20,8 +20,8 @@ gem "minima", "~> 2.0"
# If you have any plugins, put them here!
group :jekyll_plugins do
gem "jekyll-feed", "~> 0.6"
gem 'jekyll-stealthy-share', git: 'https://github.com/rfwatson/jekyll-stealthy-share.git'
end
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]

View File

@ -1,3 +1,9 @@
GIT
remote: https://github.com/rfwatson/jekyll-stealthy-share.git
revision: 935cd054662c2987ea88e782794ea8d4f764bae2
specs:
jekyll-stealthy-share (0.1.0)
GEM
remote: https://rubygems.org/
specs:
@ -41,7 +47,7 @@ GEM
rouge (2.2.1)
ruby_dep (1.5.0)
safe_yaml (1.0.4)
sass (3.5.4)
sass (3.5.5)
sass-listen (~> 4.0.0)
sass-listen (4.0.0)
rb-fsevent (~> 0.9, >= 0.9.4)
@ -53,6 +59,7 @@ PLATFORMS
DEPENDENCIES
jekyll (~> 3.6.2)
jekyll-feed (~> 0.6)
jekyll-stealthy-share!
minima (~> 2.0)
tzinfo-data

View File

@ -21,12 +21,14 @@ baseurl: "" # the subpath of your site, e.g. /blog
url: "https://netflux.io" # the base hostname & protocol for your site, e.g. http://example.com
github_username: rfwatson
permalink: /blog/:year/:month/:day/:title/
google_analytics: UA-8059487-21
# Build settings
markdown: kramdown
theme: minima
plugins:
- jekyll-feed
- jekyll-stealthy-share
# Exclude from processing.
# The following items will not be processed, by default. Create a custom list

18
_includes/head.html Normal file
View File

@ -0,0 +1,18 @@
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>{% if page.title %}{{ page.title | escape }}{% else %}{{ site.title | escape }}{% endif %}</title>
<meta name="description" content="{{ page.excerpt | default: site.description | strip_html | normalize_whitespace | truncate: 160 | escape }}">
<link rel="stylesheet" href="{{ "/assets/main.css" | relative_url }}">
{% stealthy_share_assets %}
<link rel="canonical" href="{{ page.url | replace:'index.html','' | absolute_url }}">
<link rel="alternate" type="application/rss+xml" title="{{ site.title | escape }}" href="{{ "/feed.xml" | relative_url }}">
{% if jekyll.environment == 'production' and site.google_analytics %}
{% include google-analytics.html %}
{% endif %}
</head>

27
_layouts/post.html Normal file
View File

@ -0,0 +1,27 @@
---
layout: default
---
<article class="post" itemscope itemtype="http://schema.org/BlogPosting">
<header class="post-header">
<h1 class="post-title" itemprop="name headline">{{ page.title | escape }}</h1>
<p class="post-meta">
<time datetime="{{ page.date | date_to_xmlschema }}" itemprop="datePublished">
{% assign date_format = site.minima.date_format | default: "%b %-d, %Y" %}
{{ page.date | date: date_format }}
</time>
{% if page.author %}
<span itemprop="author" itemscope itemtype="http://schema.org/Person"><span itemprop="name">{{ page.author }}</span></span>
{% endif %}</p>
</header>
<div class="post-content" itemprop="articleBody">
{{ content }}
</div>
{% stealthy_share_buttons: facebook, twitter, reddit, hacker_news %}
{% if site.disqus.shortname %}
{% include disqus_comments.html %}
{% endif %}
</article>