Skip to content
This repository has been archived by the owner on Aug 22, 2019. It is now read-only.

Commit

Permalink
Merge pull request #57 from aav7fl/SEOTest
Browse files Browse the repository at this point in the history
Update SEO changes/tests
  • Loading branch information
aav7fl authored Apr 25, 2017
2 parents 5bcafa0 + 35e8a3c commit 6f78294
Show file tree
Hide file tree
Showing 28 changed files with 244 additions and 119 deletions.
2 changes: 2 additions & 0 deletions .rspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
--color
--require spec_helper
19 changes: 19 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
Metrics/LineLength:
Exclude:
- spec/**/*

Metrics/BlockLength:
Exclude:
- spec/**/*

Style/Documentation:
Enabled: false

Style/FileName:
Enabled: false

Style/IndentHeredoc:
Exclude:
- spec/**/*

AllCops:
Exclude:
- vendor/**/* # Ignore Travis-CI build directory
- node_modules/**/* # Ignore node modules directory
12 changes: 7 additions & 5 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,17 @@ gem 'jekyll-gist'
gem 'jekyll-last-modified-at'
gem 'jekyll-paginate'
gem 'jekyll-redirect-from'
gem 'jekyll-seo-tag'
gem 'jekyll-sitemap'
gem 'nokogiri'
gem 'rspec'
gem 'rubocop'

group :jekyll_plugins do
git 'https://github.com/aav7fl/jekyll-seo-tag.git' do
gem 'jekyll-seo-tag', branch: 'testing'
end
end
# group :jekyll_plugins do
# gem 'jekyll-seo-tag',
# git: 'https://github.com/jekyll/jekyll-seo-tag.git',
# branch: 'master'
# end

# Test the build
group :test do
Expand Down
63 changes: 36 additions & 27 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,19 +1,12 @@
GIT
remote: https://github.com/aav7fl/jekyll-seo-tag.git
revision: 3410feec9784ced33f5f47e4b36cb3b6dc9f334b
specs:
jekyll-seo-tag (2.1.0)
jekyll (~> 3.3)

GEM
remote: http://rubygems.org/
specs:
activesupport (5.0.1)
activesupport (5.0.2)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (~> 0.7)
minitest (~> 5.1)
tzinfo (~> 1.1)
addressable (2.5.0)
addressable (2.5.1)
public_suffix (~> 2.0, >= 2.0.2)
amp-jekyll (1.0.1)
fastimage (>= 1.8.0)
Expand All @@ -22,16 +15,16 @@ GEM
ast (2.3.0)
colorator (1.1.0)
colored (1.2)
concurrent-ruby (1.0.4)
concurrent-ruby (1.0.5)
diff-lcs (1.3)
ethon (0.10.1)
ffi (>= 1.3.0)
faraday (0.11.0)
faraday (0.12.0.1)
multipart-post (>= 1.2, < 3)
fastimage (2.0.1)
addressable (~> 2)
ffi (1.9.17)
fastimage (2.1.0)
ffi (1.9.18)
forwardable-extended (2.6.0)
html-proofer (3.4.0)
html-proofer (3.6.0)
activesupport (>= 4.2, < 6.0)
addressable (~> 2.3)
colored (~> 1.2)
Expand All @@ -41,7 +34,7 @@ GEM
typhoeus (~> 0.7)
yell (~> 2.0)
i18n (0.8.1)
jekyll (3.4.0)
jekyll (3.4.3)
addressable (~> 2.4)
colorator (~> 1.0)
jekyll-sass-converter (~> 1.0)
Expand All @@ -52,7 +45,7 @@ GEM
pathutil (~> 0.9)
rouge (~> 1.7)
safe_yaml (~> 1.0)
jekyll-feed (0.9.1)
jekyll-feed (0.9.2)
jekyll (~> 3.3)
jekyll-gist (1.4.0)
octokit (~> 4.2)
Expand All @@ -64,7 +57,9 @@ GEM
jekyll (~> 3.3)
jekyll-sass-converter (1.5.0)
sass (~> 3.4)
jekyll-sitemap (1.0.0)
jekyll-seo-tag (2.2.1)
jekyll (~> 3.3)
jekyll-sitemap (1.1.1)
jekyll (~> 3.3)
jekyll-watch (1.5.0)
listen (~> 3.0, < 3.1)
Expand All @@ -77,11 +72,11 @@ GEM
mini_portile2 (2.1.0)
minitest (5.10.1)
multipart-post (2.0.0)
nokogiri (1.7.0.1)
nokogiri (1.7.1)
mini_portile2 (~> 2.1.0)
octokit (4.6.2)
octokit (4.7.0)
sawyer (~> 0.8.0, >= 0.5.3)
parallel (1.10.0)
parallel (1.11.1)
parser (2.4.0.0)
ast (~> 2.2)
pathutil (0.14.0)
Expand All @@ -95,7 +90,20 @@ GEM
rb-inotify (0.9.8)
ffi (>= 0.5.0)
rouge (1.11.1)
rubocop (0.47.1)
rspec (3.5.0)
rspec-core (~> 3.5.0)
rspec-expectations (~> 3.5.0)
rspec-mocks (~> 3.5.0)
rspec-core (3.5.4)
rspec-support (~> 3.5.0)
rspec-expectations (3.5.0)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.5.0)
rspec-mocks (3.5.0)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.5.0)
rspec-support (3.5.0)
rubocop (0.48.1)
parser (>= 2.3.3.1, < 3.0)
powerpack (~> 0.1)
rainbow (>= 1.99.1, < 3.0)
Expand All @@ -107,12 +115,12 @@ GEM
sawyer (0.8.1)
addressable (>= 2.3.5, < 2.6)
faraday (~> 0.8, < 1.0)
thread_safe (0.3.5)
thread_safe (0.3.6)
typhoeus (0.8.0)
ethon (>= 0.8.0)
tzinfo (1.2.2)
tzinfo (1.2.3)
thread_safe (~> 0.1)
unicode-display_width (1.1.3)
unicode-display_width (1.2.1)
yell (2.0.7)

PLATFORMS
Expand All @@ -128,11 +136,12 @@ DEPENDENCIES
jekyll-last-modified-at
jekyll-paginate
jekyll-redirect-from
jekyll-seo-tag!
jekyll-seo-tag
jekyll-sitemap
nokogiri
rake
rspec
rubocop

BUNDLED WITH
1.14.4
1.14.6
14 changes: 13 additions & 1 deletion Rakefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
require 'English'
require 'html-proofer'
require 'rspec/core/rake_task'
require 'rubocop/rake_task'
require 'jekyll'

Expand Down Expand Up @@ -74,6 +75,16 @@ task :amp do
end
end

desc 'Test JSON-LD'
task :json do
puts 'Testing JSON-LD against Google Structured Data Testing
Tool...'.yellow.bold
RSpec::Core::RakeTask.new(:spec) do |t|
t.pattern = 'spec/*_spec.rb'
end
Rake::Task['spec'].execute
end

desc 'Run RuboCop'
task :rubocop do
puts 'Running RuboCop Validator...'.yellow.bold
Expand All @@ -82,8 +93,9 @@ end

desc 'Run all tests'
task :test do
Rake::Task['rubocop'].invoke
Rake::Task['build'].invoke
Rake::Task['json'].invoke
Rake::Task['rubocop'].invoke
Rake::Task['html_proofer'].invoke
Rake::Task['amp'].invoke
end
9 changes: 4 additions & 5 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,11 +91,10 @@ defaults:
path: ""
values:
image:
default:
path: /assets/img/default-card.png
alt: Default-card
height: 400
width: 700
path: /assets/img/default-card.png
height: 400
width: 700
alt: Default-card
- scope:
path: _posts
values: *post_val
Expand Down
2 changes: 1 addition & 1 deletion _includes/amp-check.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<!-- Extract extra <title> tag. -->
{% assign open_tag = "<title>" %}
{% assign close_tag = "</title>" %}
{% assign extract = seo_text | split: open_tag | last | split: close_tag | first % | prepend: open_tag | append: close_tag %}
{% assign extract = seo_text | split: open_tag | last | split: close_tag | first | prepend: open_tag | append: close_tag %}
{% assign seo_text = seo_text | remove: extract %}

{% assign open_tag = '<meta property="og:title"' %}
Expand Down
2 changes: 1 addition & 1 deletion _includes/amp/post.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ <h3 class="meta">{{ page.date | date: '%B %d, %Y' }} | {{ page.content | number_

{% if page.image %}
<div class="featuredImage">
<img src="{{ page.image.default.path }}" alt="{{ page.image.default.alt }}" />
<img src="{{ page.image.path }}" alt="{{ page.alt }}" />
</div>
{% endif %}

Expand Down
4 changes: 2 additions & 2 deletions _includes/post-nav.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
<a class="post-nav-link" href="{{ page.previous.url | prepend: site.baseurl }}">
<div class="link-text previous">&laquo;&nbsp;{{ page.previous.title }}</div>
{% if page.previous.image %}
<img class="link-image" src="{{ page.previous.image.default.path | prepend: site.baseurl }}" alt="Previous Article">
<img class="link-image" src="{{ page.previous.image.path | prepend: site.baseurl }}" alt="Previous Article">
{% endif %}
</a>
{% endif %}
{% if page.next.url %}
<a class="post-nav-link" href="{{ page.next.url | prepend: site.baseurl }}">
<div class="link-text next">{{ page.next.title }}&nbsp;&raquo;</div>
{% if page.next.image %}
<img class="link-image" src="{{ page.next.image.default.path | prepend: site.baseurl }}" alt="Next Article">
<img class="link-image" src="{{ page.next.image.path | prepend: site.baseurl }}" alt="Next Article">
{% endif %}
</a>
{% endif %}
Expand Down
2 changes: 1 addition & 1 deletion _layouts/post.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ <h3 class="meta">{{ page.content | number_of_words | divided_by:120 | ceil }} Mi
</header>

{% if page.image %}
<img src="{{ page.image.default.path }}" alt="{{ page.image.default.alt }}"/>
<img src="{{ page.image.path }}" alt="{{ page.alt }}"/>
{% endif %}

<div class="line-separator"></div>
Expand Down
File renamed without changes.
9 changes: 4 additions & 5 deletions _posts/2013-09-22-restoring-vintage-with-3d-printing.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,10 @@ title: Restoring Vintage with 3D Printing
date: 2013-09-22
comments: true
image:
default:
path: /assets/img/2013/09/small/DSC09139.JPG
alt: Marantz 2220B taken apart for upgrading parts
height: 532
width: 800
path: /assets/img/2013/09/small/DSC09139.JPG
height: 532
width: 800
alt: Marantz 2220B taken apart for upgrading parts
tag: "large project"
description: "Restoring my 1974 Marantz 2220B lamp housing with 3D printing. The old lamp house was brittle and broke from the incandescent bulb heat. I now use LEDs."
redirect_from: "/blog/restoring-vintage-with-3d-printing/"
Expand Down
9 changes: 4 additions & 5 deletions _posts/2015-04-11-transferring-n64-saves.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,10 @@ title: Transferring My N64 Saves
date: "2015-04-11 16:41"
comments: true
image:
default:
path: /assets/img/2015/04/DSC09669.JPG
alt: 'N64 interfacing with The Legend of Zelda: Ocarina of Time to dump active memory'
height: 665
width: 1000
path: /assets/img/2015/04/DSC09669.JPG
height: 665
width: 1000
alt: 'N64 interfacing with The Legend of Zelda: Ocarina of Time to dump active memory'
published: true
tag: "large project"
description: "How I extracted my N64 save files such as Mario party and Zelda Ocarina of Time by dumping the ram, calculating the checksum and building the sra save file"
Expand Down
11 changes: 5 additions & 6 deletions _posts/2015-08-17-reverse-engineering-my-steelcase-desk.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,11 @@
title: Discovering and Reverse Engineering My Steelcase Desk
date: "2015-08-17 15:47"
comments: true
image:
default:
path: /assets/img/2015/08/banner.jpg
alt: Steelcase height-adjustable standing desk
height: 779
width: 800
image:
path: /assets/img/2015/08/banner.jpg
height: 779
width: 800
alt: Steelcase height-adjustable standing desk
published: true
tag: "medium project"
description: "How I reverse engineered the remote codes on my prototype Steelcase sit/stand desk unlocking secret developer codes to enable One Touch adjustments"
Expand Down
9 changes: 4 additions & 5 deletions _posts/2015-12-17-making-a-book-from-facebook-messages.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,10 @@ title: Creating a Hardcover Book from a Plethora of Facebook Messages
date: "2015-12-17 18:00"
comments: true
image:
default:
path: /assets/img/2015/12/banner.jpg
alt: Custom hardcover book composed of facebook chat messages
height: 814
width: 1000
path: /assets/img/2015/12/banner.jpg
height: 814
width: 1000
alt: Custom hardcover book composed of facebook chat messages
published: true
tag: "large project"
description: "How I made a hardcover book for someone by downloading my Facebook message archive reversing the order of each 20,000 message segment for readability"
Expand Down
9 changes: 4 additions & 5 deletions _posts/2016-03-14-word-auto-journal-macro-for-lazy.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,10 @@ title: "Microsoft Word Auto-Journal Macro for the Lazy"
date: "2016-03-14 16:19"
comments: true
image:
default:
path: /assets/img/2016/03/banner.png
alt: Microsoft Word output for auto journal macro
height: 505
width: 964
path: /assets/img/2016/03/banner.png
height: 505
width: 964
alt: Microsoft Word output for auto journal macro
published: true
tag: "small project"
description: "I created a Microsoft Word macro that automatically generated a skeleton entry for today and added up the total hours documented thus far"
Expand Down
9 changes: 4 additions & 5 deletions _posts/2016-03-15-easy-inline-usb-power-switch.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,10 @@ title: "My Easy In-line USB Power Switch"
date: "2016-03-15 20:25"
comments: true
image:
default:
path: /assets/img/2016/03/banner2.jpg
alt: Inline power switch on a USB cable
height: 603
width: 800
path: /assets/img/2016/03/banner2.jpg
height: 603
width: 800
alt: Inline power switch on a USB cable
published: true
tag: "small project"
description: "How I added a rocker in-line power switch into my 10 foot USB 2.0 Type b cable. I referenced the USB 2.0 specifications to understand which wires to cut."
Expand Down
Loading

0 comments on commit 6f78294

Please sign in to comment.