bunto-seo-tag 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 28a82e98a1182bba2575f4af2a8ebb637d308e13
4
+ data.tar.gz: e9a647f9270458aa4860ba80fe6984cda80b5330
5
+ SHA512:
6
+ metadata.gz: 0051c90a7c2312c925b238700e767dc71b6734e6268da76802ecae083c7993829b0155eb309b8e819bf81c09a5b906e721e56a831c0c73ef6e25bc19ad9fc03b
7
+ data.tar.gz: eef3e95c23c633736bae074f3bb303ea6770e24d61bc293b755e3d702a3b879ef7cf05688021a30d72bac1b94b14e378e63ea0cc3f952ef379aca723e75e7183
data/.gitignore ADDED
@@ -0,0 +1,10 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /Gemfile.lock
4
+ /_yardoc/
5
+ /coverage/
6
+ /doc/
7
+ /pkg/
8
+ /spec/reports/
9
+ /tmp/
10
+ *.gem
data/.rspec ADDED
@@ -0,0 +1,2 @@
1
+ --format documentation
2
+ --color
data/.rubocop.yml ADDED
@@ -0,0 +1,10 @@
1
+ Metrics/LineLength:
2
+ Exclude:
3
+ - spec/**/*
4
+ - bunto-seo-tag.gemspec
5
+
6
+ Style/Documentation:
7
+ Enabled: false
8
+
9
+ Style/FileName:
10
+ Enabled: false
data/.travis.yml ADDED
@@ -0,0 +1,8 @@
1
+ # Travis CI
2
+ rvm:
3
+ - 2.2.3
4
+ before_install: gem install bundler
5
+ langauage: ruby
6
+ script: script/cibuild
7
+ sudo: false
8
+ cache: bundler
data/Gemfile ADDED
@@ -0,0 +1,16 @@
1
+ source 'https://rubygems.org'
2
+ require 'json'
3
+ require 'open-uri'
4
+
5
+ gemspec
6
+
7
+ group :development, :test do
8
+ versions = JSON.parse(open('https://pages.github.com/versions.json').read)
9
+ versions.delete('ruby')
10
+ versions.delete('bunto-seo-tag')
11
+ versions.delete('github-pages')
12
+
13
+ versions.each do |dep, version|
14
+ gem dep, version
15
+ end
16
+ end
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2016-present Ben Balter
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,155 @@
1
+ # Bunto SEO Tag
2
+
3
+ A Bunto plugin to add metadata tags for search engines and social networks to better index and display your site's content.
4
+
5
+ [![Gem Version](https://badge.fury.io/rb/bunto-seo-tag.svg)](https://badge.fury.io/rb/bunto-seo-tag) [![Build Status](https://travis-ci.org/bunto/bunto-seo-tag.svg)](https://travis-ci.org/bunto/bunto-seo-tag)
6
+
7
+ ## What it does
8
+
9
+ Bunto SEO Tag adds the following meta tags to your site:
10
+
11
+ * Pages title (with site title appended when available)
12
+ * Page description
13
+ * Canonical URL
14
+ * Next and previous URLs for posts
15
+ * [JSON-LD Site and post metadata](https://developers.google.com/structured-data/) for richer indexing
16
+ * [Open graph](http://ogp.me/) title, description, site title, and URL (for Facebook, LinkedIn, etc.)
17
+ * [Twitter summary card](https://dev.twitter.com/cards/overview) metadata
18
+
19
+ While you could theoretically add the necessary metadata tags yourself, Bunto SEO Tag provides a battle-tested template of crowdsourced best-practices.
20
+
21
+ ## What it doesn't do
22
+
23
+ Bunto SEO tag is designed to output machine-readable metadata for search engines and social networks to index and display. If you're looking for something to analyze your Bunto site's structure and content (e.g., more traditional SEO optimization), take a look at the Bunto-similar gem ["The Jekyll SEO Gem"](https://github.com/pmarsceill/jekyll-seo-gem).
24
+
25
+ Bunto SEO tag isn't designed to accommodate every possible use case. It should work for most site out of the box and without a laundry list of configuration options that serve only to confuse most users.
26
+
27
+ ## Installation
28
+
29
+ 1. Add the following to your site's `Gemfile`:
30
+
31
+ ```ruby
32
+ gem 'bunto-seo-tag'
33
+ ```
34
+
35
+ 2. Add the following to your site's `_config.yml`:
36
+
37
+ ```yml
38
+ gems:
39
+ - bunto-seo-tag
40
+ ```
41
+
42
+ 3. Add the following right before `</head>` in your site's template(s):
43
+
44
+ ```liquid
45
+ {% seo %}
46
+ ```
47
+
48
+ ## Usage
49
+
50
+ The SEO tag will respect any of the following if included in your site's `_config.yml` (and simply not include them if they're not defined):
51
+
52
+ * `title` - Your site's title (e.g., Suriyaa's awesome site, The GitHub Blog, etc.)
53
+ * `description` - A short description (e.g., A blog dedicated to reviewing cat gifs)
54
+ * `url` - The full URL to your site. Note: `site.github.url` will be used by default.
55
+ * `author` - global author information (see below)
56
+ * `twitter:username` - The site's Twitter handle. You'll want to describe it like so:
57
+
58
+ ```yml
59
+ twitter:
60
+ username: SuriyaaKudoIsc
61
+ ```
62
+
63
+ * `facebook:app_id` (a Facebook app ID for Facebook insights), and/or `facebook:publisher` (a Facebook page URL or ID of the publishing entity). You'll want to describe one or both like so:
64
+
65
+ ```yml
66
+ facebook:
67
+ app_id: 1234
68
+ publisher: 1234
69
+ ```
70
+
71
+ * `logo` - Relative URL to a site-wide logo (e.g., `/assets/your-company-logo.png`)
72
+ * `social` - For [specifying social profiles](https://developers.google.com/structured-data/customize/social-profiles). The following properties are available:
73
+ * `name` - If the user or organization name differs from the site's name
74
+ * `links` - An array of links to social media profiles.
75
+ * `google_site_verification` for verifying ownership via Google webmaster tools
76
+
77
+ The SEO tag will respect the following YAML front matter if included in a post, page, or document:
78
+
79
+ * `title` - The title of the post, page, or document
80
+ * `description` - A short description of the page's content
81
+ * `image` - Relative URL to an image associated with the post, page, or document (e.g., `/assets/page-pic.jpg`)
82
+ * `author` - Page-, post-, or document-specific author information (see below)
83
+
84
+ ### Disabling `<title>` output
85
+
86
+ Bunto SEO Tag is designed to implement SEO best practices by default. If for some reason, you don't want the plugin to output `<title>` tags on each page, simply invoke the plugin within your template like so:
87
+
88
+ ```
89
+ {% seo title=false %}
90
+ ```
91
+
92
+ ### Author information
93
+
94
+ Author information is used to propagate the `creator` field of Twitter summary cards. This is should be an author-specific, not site-wide Twitter handle (the site-wide username be stored as `site.twitter.username`).
95
+
96
+ *TL;DR: In most cases, put `author: [your Twitter handle]` in the document's front matter, for sites with multiple authors. If you need something more complicated, read on.*
97
+
98
+ There are several ways to convey this author-specific information. Author information is found in the following order of priority:
99
+
100
+ 1. An `author` object, in the documents's front matter, e.g.:
101
+
102
+ ```yml
103
+ author:
104
+ twitter: SuriyaaKudoIsc
105
+ ```
106
+
107
+ 2. An `author` object, in the site's `_config.yml`, e.g.:
108
+
109
+ ```yml
110
+ author:
111
+ twitter: SuriyaaKudoIsc
112
+ ```
113
+
114
+ 3. `site.data.authors[author]`, if an author is specified in the document's front matter, and a corresponding key exists in `site.data.authors`. E.g., you have the following in the document's front matter:
115
+
116
+ ```yml
117
+ author: SuriyaaKudoIsc
118
+ ```
119
+
120
+ And you have the following in `_data/authors.yml`:
121
+
122
+ ```yml
123
+ SuriyaaKudoIsc:
124
+ picture: /img/SuriyaaKudoIsc.png
125
+ twitter: buntorb
126
+
127
+ potus:
128
+ picture: /img/potus.png
129
+ twitter: whitehouse
130
+ ```
131
+
132
+ In the above example, the author `SuriyaaKudoIsc`'s Twitter handle will be resolved to `@buntorb`. This allows you to centralize author information in a single `_data/authors` file for site with many authors that require more than just the author's username.
133
+
134
+ *Pro-tip: If `authors` is present in the document's front matter as an array (and `author` is not), the plugin will use the first author listed, as Twitter supports only one author.*
135
+
136
+ 4. An author in the document's front matter (the simplest way), e.g.:
137
+
138
+ ```yml
139
+ author: SuriyaaKudoIsc
140
+ ```
141
+
142
+ 5. An author in the site's `_config.yml`, e.g.:
143
+
144
+ ```yml
145
+ author: SuriyaaKudoIsc
146
+ ```
147
+
148
+ ### Customizing JSON-LD output
149
+
150
+ The following options can be set for any particular page. While the default options are meant to serve most users in the most common circumstances, there may be situations where more precise control is necessary.
151
+
152
+ * `seo`
153
+ * `name` - If the name of the thing that the page represents is different from the page title. (i.e.: "Frank's Café" vs "Welcome to Frank's Café")
154
+ * `type` - The type of things that the page represents. This must be a [Schema.org type](http://schema.org/docs/schemas.html), and will probably usually be something like [`BlogPosting`](http://schema.org/BlogPosting), [`NewsArticle`](http://schema.org/NewsArticle), [`Person`](http://schema.org/Person), [`Organization`](http://schema.org/Organization), etc.
155
+ * `links` - An array of other URLs that represent the same thing that this page represents. For instance, Jane's bio page might include links to Jane's GitHub and Twitter profiles.
data/Rakefile ADDED
@@ -0,0 +1,6 @@
1
+ require 'bundler/gem_tasks'
2
+ require 'rspec/core/rake_task'
3
+
4
+ RSpec::Core::RakeTask.new(:spec)
5
+
6
+ task default: :spec
@@ -0,0 +1,34 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'bunto-seo-tag/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = 'bunto-seo-tag'
8
+ spec.version = Bunto::SeoTag::VERSION
9
+ spec.authors = ['Ben Balter', 'Suriyaa Kudo']
10
+ spec.email = ['ben.balter@github.com', 'SuriyaaKudoIsc@users.noreply.github.com']
11
+ spec.summary = "A Bunto plugin to add metadata tags for search engines and social networks to better index and display your site's content."
12
+ spec.homepage = 'https://github.com/benbalter/bunto-seo-tag'
13
+ spec.license = 'MIT'
14
+
15
+ # Prevent pushing this gem to RubyGems.org by setting 'allowed_push_host', or
16
+ # delete this section to allow pushing this gem to any host.
17
+ if spec.respond_to?(:metadata)
18
+ spec.metadata['allowed_push_host'] = 'https://rubygems.org'
19
+ else
20
+ raise 'RubyGems 2.0 or newer is required to protect against public gem pushes.'
21
+ end
22
+
23
+ spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
24
+ spec.bindir = 'exe'
25
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
26
+ spec.require_paths = ['lib']
27
+
28
+ spec.add_dependency 'bunto', '~> 1.0'
29
+ spec.add_development_dependency 'bundler', '~> 1.10'
30
+ spec.add_development_dependency 'rake', '~> 10.0'
31
+ spec.add_development_dependency 'rspec', '~> 3.3'
32
+ spec.add_development_dependency 'html-proofer', '~> 2.5'
33
+ spec.add_development_dependency 'rubocop', '~> 0.37'
34
+ end
@@ -0,0 +1,13 @@
1
+ module BuntoSeoTag
2
+ module Filters
3
+ # This is available in Liquid from version 3 which is required by Bunto 2
4
+ # Provided here for compatibility with Bunto 1.x
5
+ def default(input, default_value = ''.freeze)
6
+ if !input || input.respond_to?(:empty?) && input.empty?
7
+ default_value
8
+ else
9
+ input
10
+ end
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,8 @@
1
+ # Prevent bundler errors
2
+ module Liquid; class Tag; end; end
3
+
4
+ module Bunto
5
+ class SeoTag < Liquid::Tag
6
+ VERSION = '1.0.0'.freeze
7
+ end
8
+ end
@@ -0,0 +1,66 @@
1
+ require 'bunto-seo-tag/filters'
2
+ require 'bunto-seo-tag/version'
3
+
4
+ module Bunto
5
+ class SeoTag < Liquid::Tag
6
+ attr_accessor :context
7
+
8
+ MINIFY_REGEX = /([>,]\n|[%}]})\s+?(<|{[{%]|[ ]+\")/
9
+
10
+ def initialize(_tag_name, text, _tokens)
11
+ super
12
+ @text = text
13
+ end
14
+
15
+ def render(context)
16
+ @context = context
17
+ template.render!(payload, info)
18
+ end
19
+
20
+ private
21
+
22
+ def options
23
+ {
24
+ 'version' => Bunto::SeoTag::VERSION,
25
+ 'title' => title?
26
+ }
27
+ end
28
+
29
+ def payload
30
+ {
31
+ 'page' => context.registers[:page],
32
+ 'site' => context.registers[:site].site_payload['site'],
33
+ 'seo_tag' => options
34
+ }
35
+ end
36
+
37
+ def title?
38
+ !(@text =~ /title=false/i)
39
+ end
40
+
41
+ def info
42
+ {
43
+ registers: context.registers,
44
+ filters: [Bunto::Filters, BuntoSeoTag::Filters]
45
+ }
46
+ end
47
+
48
+ def template
49
+ @template ||= Liquid::Template.parse template_contents
50
+ end
51
+
52
+ def template_contents
53
+ @template_contents ||= begin
54
+ File.read(template_path).gsub(MINIFY_REGEX, '\1\2').chomp
55
+ end
56
+ end
57
+
58
+ def template_path
59
+ @template_path ||= begin
60
+ File.expand_path './template.html', File.dirname(__FILE__)
61
+ end
62
+ end
63
+ end
64
+ end
65
+
66
+ Liquid::Template.register_tag('seo', Bunto::SeoTag)
data/lib/template.html ADDED
@@ -0,0 +1,202 @@
1
+ <!-- Begin Bunto SEO tag v{{ seo_tag.version }} -->
2
+
3
+ {% if page.url == "/" or page.url == "/about/" %}
4
+ {% assign seo_homepage_or_about = true %}
5
+ {% endif %}
6
+
7
+ {% if site.url %}
8
+ {% assign seo_url = site.url | append: site.baseurl %}
9
+ {% endif %}
10
+ {% assign seo_url = seo_url | default: site.github.url %}
11
+ {% assign seo_site_title = site.title | default: site.name %}
12
+
13
+ {% if page.title %}
14
+ {% assign seo_title = page.title %}
15
+ {% assign seo_page_title = page.title %}
16
+
17
+ {% if seo_site_title %}
18
+ {% assign seo_title = seo_title | append:" - " | append: seo_site_title %}
19
+ {% endif %}
20
+ {% elsif seo_site_title %}
21
+ {% assign seo_title = seo_site_title %}
22
+ {% assign seo_page_title = seo_site_title %}
23
+
24
+ {% if site.description %}
25
+ {% assign seo_title = seo_title | append:" - " | append: site.description %}
26
+ {% endif %}
27
+ {% endif %}
28
+
29
+ {% if page.seo and page.seo.name %}
30
+ {% assign seo_name = page.seo.name %}
31
+ {% elsif seo_homepage_or_about and site.social and site.social.name %}
32
+ {% assign seo_name = site.social.name %}
33
+ {% elsif seo_homepage_or_about and seo_site_title %}
34
+ {% assign seo_name = seo_site_title %}
35
+ {% endif %}
36
+ {% if seo_name %}
37
+ {% assign seo_name = seo_name | markdownify | strip_html | strip_newlines | escape_once %}
38
+ {% endif %}
39
+
40
+ {% if seo_title %}
41
+ {% assign seo_title = seo_title | markdownify | strip_html | strip_newlines | escape_once %}
42
+ {% endif %}
43
+
44
+ {% if seo_site_title %}
45
+ {% assign seo_site_title = seo_site_title | markdownify | strip_html | strip_newlines | escape_once %}
46
+ {% endif %}
47
+
48
+ {% if seo_page_title %}
49
+ {% assign seo_page_title = seo_page_title | markdownify | strip_html | strip_newlines | escape_once %}
50
+ {% endif %}
51
+
52
+ {% assign seo_description = page.description | default: page.excerpt | default: site.description %}
53
+ {% if seo_description %}
54
+ {% assign seo_description = seo_description | markdownify | strip_html | strip_newlines | escape_once %}
55
+ {% endif %}
56
+
57
+ {% assign seo_author = page.author | default: page.authors[0] | default: site.author %}
58
+ {% if seo_author %}
59
+ {% if seo_author.twitter %}
60
+ {% assign seo_author_twitter = seo_author.twitter %}
61
+ {% else %}
62
+ {% if site.data.authors and site.data.authors[seo_author] %}
63
+ {% assign seo_author_twitter = site.data.authors[seo_author].twitter %}
64
+ {% else %}
65
+ {% assign seo_author_twitter = seo_author %}
66
+ {% endif %}
67
+ {% endif %}
68
+ {% assign seo_author_twitter = seo_author_twitter | replace:"@","" %}
69
+ {% endif %}
70
+
71
+ {% if page.seo and page.seo.type %}
72
+ {% assign seo_type = page.seo.type %}
73
+ {% elsif seo_homepage_or_about %}
74
+ {% assign seo_type = "WebSite" %}
75
+ {% elsif page.date %}
76
+ {% assign seo_type = "BlogPosting" %}
77
+ {% else %}
78
+ {% assign seo_type = "WebPage" %}
79
+ {% endif %}
80
+
81
+ {% if page.seo and page.seo.links %}
82
+ {% assign seo_links = page.seo.links %}
83
+ {% elsif seo_homepage_or_about and site.social and site.social.links %}
84
+ {% assign seo_links = site.social.links %}
85
+ {% endif %}
86
+
87
+ {% if site.logo %}
88
+ {% assign seo_site_logo = site.logo | prepend: seo_url | escape %}
89
+ {% endif %}
90
+
91
+ {% if page.image %}
92
+ {% assign seo_page_image = page.image | prepend: seo_url | escape %}
93
+ {% endif %}
94
+
95
+ {% if seo_tag.title and seo_title %}
96
+ <title>{{ seo_title }}</title>
97
+ {% endif %}
98
+
99
+ {% if seo_page_title %}
100
+ <meta property="og:title" content="{{ seo_page_title }}" />
101
+ {% endif %}
102
+
103
+ {% if seo_description %}
104
+ <meta name="description" content="{{ seo_description }}" />
105
+ <meta property="og:description" content="{{ seo_description }}" />
106
+ {% endif %}
107
+
108
+ {% if seo_url %}
109
+ <link rel="canonical" href="{{ page.url | prepend: seo_url | replace:'/index.html','/' }}" />
110
+ <meta property="og:url" content="{{ page.url | prepend: seo_url | replace:'/index.html','/' }}" />
111
+ {% endif %}
112
+
113
+ {% if seo_site_title %}
114
+ <meta property="og:site_name" content="{{ seo_site_title }}" />
115
+ {% endif %}
116
+
117
+ {% if seo_page_image %}
118
+ <meta property="og:image" content="{{ seo_page_image }}" />
119
+ {% endif %}
120
+
121
+ {% if page.date %}
122
+ <meta property="og:type" content="article" />
123
+ <meta property="article:published_time" content="{{ page.date | date_to_xmlschema }}" />
124
+
125
+ {% if page.next.url %}
126
+ <link rel="next" href="{{ page.next.url | prepend: seo_url | replace:'/index.html','/' }}" title="{{ page.next.title | escape }}" />
127
+ {% endif %}
128
+
129
+ {% if page.previous.url %}
130
+ <link rel="prev" href="{{ page.previous.url | prepend: seo_url | replace:'/index.html','/' }}" title="{{ page.previous.title | escape }}" />
131
+ {% endif %}
132
+ {% endif %}
133
+
134
+ {% if site.twitter %}
135
+ {% if seo_page_image %}
136
+ <meta name="twitter:card" content="summary_large_image" />
137
+ {% else %}
138
+ <meta name="twitter:card" content="summary" />
139
+ {% endif %}
140
+
141
+ <meta name="twitter:site" content="@{{ site.twitter.username | replace:"@","" }}" />
142
+
143
+ {% if seo_author_twitter %}
144
+ <meta name="twitter:creator" content="@{{ seo_author_twitter }}" />
145
+ {% endif %}
146
+ {% endif %}
147
+
148
+ {% if site.facebook %}
149
+ {% if site.facebook.publisher %}
150
+ <meta property="article:publisher" content="{{ site.facebook.publisher }}" />
151
+ {% endif %}
152
+
153
+ {% if site.facebook.app_id %}
154
+ <meta property="fb:app_id" content="{{ site.facebook.app_id }}" />
155
+ {% endif %}
156
+ {% endif %}
157
+
158
+ {% if site.google_site_verification %}
159
+ <meta name="google-site-verification" content="{{ site.google_site_verification }}" />
160
+ {% endif %}
161
+
162
+ <script type="application/ld+json">
163
+ {
164
+ "@context": "http://schema.org",
165
+
166
+ {% if seo_type %}
167
+ "@type": {{ seo_type | jsonify }},
168
+ {% endif %}
169
+
170
+ {% if seo_name %}
171
+ "name": {{ seo_name | jsonify }},
172
+ {% endif %}
173
+
174
+ {% if seo_page_title %}
175
+ "headline": {{ seo_page_title | jsonify }},
176
+ {% endif %}
177
+
178
+ {% if seo_page_image %}
179
+ "image": {{ seo_page_image | jsonify }},
180
+ {% endif %}
181
+
182
+ {% if page.date %}
183
+ "datePublished": {{ page.date | date_to_xmlschema | jsonify }},
184
+ {% endif %}
185
+
186
+ {% if seo_description %}
187
+ "description": {{ seo_description | jsonify }},
188
+ {% endif %}
189
+
190
+ {% if seo_site_logo %}
191
+ "logo": {{ seo_site_logo | jsonify }},
192
+ {% endif %}
193
+
194
+ {% if seo_links %}
195
+ "sameAs": {{ seo_links | jsonify }},
196
+ {% endif %}
197
+
198
+ "url": {{ page.url | prepend: seo_url | replace:'/index.html','/' | jsonify }}
199
+ }
200
+ </script>
201
+
202
+ <!-- End Bunto SEO tag -->
data/script/bootstrap ADDED
@@ -0,0 +1,5 @@
1
+ #!/bin/sh
2
+
3
+ set -ex
4
+
5
+ bundle install
data/script/cibuild ADDED
@@ -0,0 +1,7 @@
1
+ #!/bin/sh
2
+
3
+ set -ex
4
+
5
+ bundle exec rake spec
6
+ bundle exec rubocop -S -D
7
+ bundle exec gem build bunto-seo-tag.gemspec
data/script/release ADDED
@@ -0,0 +1,38 @@
1
+ #!/bin/sh
2
+ # Tag and push a release.
3
+
4
+ set -e
5
+
6
+ # Make sure we're in the project root.
7
+
8
+ cd $(dirname "$0")/..
9
+
10
+ # Build a new gem archive.
11
+
12
+ rm -rf bunto-seo-tag-*.gem
13
+ gem build -q bunto-seo-tag.gemspec
14
+
15
+ # Make sure we're on the master branch.
16
+
17
+ (git branch | grep -q '* master') || {
18
+ echo "Only release from the master branch."
19
+ exit 1
20
+ }
21
+
22
+ # Figure out what version we're releasing.
23
+
24
+ tag=v`ls bunto-seo-tag-*.gem | sed 's/^bunto-seo-tag-\(.*\)\.gem$/\1/'`
25
+
26
+ # Make sure we haven't released this version before.
27
+
28
+ git fetch -t origin
29
+
30
+ (git tag -l | grep -q "$tag") && {
31
+ echo "Whoops, there's already a '${tag}' tag."
32
+ exit 1
33
+ }
34
+
35
+ # Tag it and bag it.
36
+
37
+ gem push bunto-seo-tag-*.gem && git tag "$tag" &&
38
+ git push origin master && git push origin "$tag"
metadata ADDED
@@ -0,0 +1,148 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: bunto-seo-tag
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0
5
+ platform: ruby
6
+ authors:
7
+ - Ben Balter
8
+ - Suriyaa Kudo
9
+ autorequire:
10
+ bindir: exe
11
+ cert_chain: []
12
+ date: 2016-03-13 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: bunto
16
+ requirement: !ruby/object:Gem::Requirement
17
+ requirements:
18
+ - - "~>"
19
+ - !ruby/object:Gem::Version
20
+ version: '1.0'
21
+ type: :runtime
22
+ prerelease: false
23
+ version_requirements: !ruby/object:Gem::Requirement
24
+ requirements:
25
+ - - "~>"
26
+ - !ruby/object:Gem::Version
27
+ version: '1.0'
28
+ - !ruby/object:Gem::Dependency
29
+ name: bundler
30
+ requirement: !ruby/object:Gem::Requirement
31
+ requirements:
32
+ - - "~>"
33
+ - !ruby/object:Gem::Version
34
+ version: '1.10'
35
+ type: :development
36
+ prerelease: false
37
+ version_requirements: !ruby/object:Gem::Requirement
38
+ requirements:
39
+ - - "~>"
40
+ - !ruby/object:Gem::Version
41
+ version: '1.10'
42
+ - !ruby/object:Gem::Dependency
43
+ name: rake
44
+ requirement: !ruby/object:Gem::Requirement
45
+ requirements:
46
+ - - "~>"
47
+ - !ruby/object:Gem::Version
48
+ version: '10.0'
49
+ type: :development
50
+ prerelease: false
51
+ version_requirements: !ruby/object:Gem::Requirement
52
+ requirements:
53
+ - - "~>"
54
+ - !ruby/object:Gem::Version
55
+ version: '10.0'
56
+ - !ruby/object:Gem::Dependency
57
+ name: rspec
58
+ requirement: !ruby/object:Gem::Requirement
59
+ requirements:
60
+ - - "~>"
61
+ - !ruby/object:Gem::Version
62
+ version: '3.3'
63
+ type: :development
64
+ prerelease: false
65
+ version_requirements: !ruby/object:Gem::Requirement
66
+ requirements:
67
+ - - "~>"
68
+ - !ruby/object:Gem::Version
69
+ version: '3.3'
70
+ - !ruby/object:Gem::Dependency
71
+ name: html-proofer
72
+ requirement: !ruby/object:Gem::Requirement
73
+ requirements:
74
+ - - "~>"
75
+ - !ruby/object:Gem::Version
76
+ version: '2.5'
77
+ type: :development
78
+ prerelease: false
79
+ version_requirements: !ruby/object:Gem::Requirement
80
+ requirements:
81
+ - - "~>"
82
+ - !ruby/object:Gem::Version
83
+ version: '2.5'
84
+ - !ruby/object:Gem::Dependency
85
+ name: rubocop
86
+ requirement: !ruby/object:Gem::Requirement
87
+ requirements:
88
+ - - "~>"
89
+ - !ruby/object:Gem::Version
90
+ version: '0.37'
91
+ type: :development
92
+ prerelease: false
93
+ version_requirements: !ruby/object:Gem::Requirement
94
+ requirements:
95
+ - - "~>"
96
+ - !ruby/object:Gem::Version
97
+ version: '0.37'
98
+ description:
99
+ email:
100
+ - ben.balter@github.com
101
+ - SuriyaaKudoIsc@users.noreply.github.com
102
+ executables: []
103
+ extensions: []
104
+ extra_rdoc_files: []
105
+ files:
106
+ - ".gitignore"
107
+ - ".rspec"
108
+ - ".rubocop.yml"
109
+ - ".travis.yml"
110
+ - Gemfile
111
+ - LICENSE.txt
112
+ - README.md
113
+ - Rakefile
114
+ - bunto-seo-tag.gemspec
115
+ - lib/bunto-seo-tag.rb
116
+ - lib/bunto-seo-tag/filters.rb
117
+ - lib/bunto-seo-tag/version.rb
118
+ - lib/template.html
119
+ - script/bootstrap
120
+ - script/cibuild
121
+ - script/release
122
+ homepage: https://github.com/benbalter/bunto-seo-tag
123
+ licenses:
124
+ - MIT
125
+ metadata:
126
+ allowed_push_host: https://rubygems.org
127
+ post_install_message:
128
+ rdoc_options: []
129
+ require_paths:
130
+ - lib
131
+ required_ruby_version: !ruby/object:Gem::Requirement
132
+ requirements:
133
+ - - ">="
134
+ - !ruby/object:Gem::Version
135
+ version: '0'
136
+ required_rubygems_version: !ruby/object:Gem::Requirement
137
+ requirements:
138
+ - - ">="
139
+ - !ruby/object:Gem::Version
140
+ version: '0'
141
+ requirements: []
142
+ rubyforge_project:
143
+ rubygems_version: 2.2.2
144
+ signing_key:
145
+ specification_version: 4
146
+ summary: A Bunto plugin to add metadata tags for search engines and social networks
147
+ to better index and display your site's content.
148
+ test_files: []