middleman-metaman 0.1.6 → 0.1.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3a2a8ce9708336d9c838361407fdbde3a054d0e86e30fef8ffebfd11e91f0d73
4
- data.tar.gz: d0d52a5e5b7cb944dbbe27d55ffd9f11bc8a6638af33db012ec599ec6477fcec
3
+ metadata.gz: 98e03a793f507415717468c59cf3697d59726ecce9e50773338197e92272a510
4
+ data.tar.gz: 7df61a29a163ff54f711f0208b1364315c16d47d00d1b12bfe6a0f0b9764df8f
5
5
  SHA512:
6
- metadata.gz: ea892ec190985247ba925cf9142b7ed06790d4b0a3a649825fdcb6cb237b7c89df82185181baa1da31f9d6ca066c2f1d7a6aeabd339fa43ac3e2797b05b31cba
7
- data.tar.gz: 84254ab7e70d46a0ca33a0fd240f36c0ddb40322888952bb16e0c1b8874832a5849c2dbbefee5f03c1ef0c58ea4888e2127ed9da6a86e059a81605c5cdf267be
6
+ metadata.gz: 0dddad46bcf693c5f564ced933b30786f96ebb52314291752cdbf0ed9e1c15d39bbbdff84d80109d869f089efba2f307db827956c9c7eafe651ee3f5ea97d496
7
+ data.tar.gz: f53c06edd75fcbdf11997b669e1982620e0e64e91f9ee7c91b5e424b8f231a4b3abde4d50807520f6cddcd443851e57f4a1412955a3239764e6da5748f7ba218
@@ -11,6 +11,8 @@ module Middleman
11
11
  @meta_tags ||= ActiveSupport::HashWithIndifferentAccess.new
12
12
  @meta_tags[:og] ||= ActiveSupport::HashWithIndifferentAccess.new
13
13
  @meta_tags[:twitter] ||= ActiveSupport::HashWithIndifferentAccess.new
14
+ @meta_tags[:canonical] = true
15
+
14
16
  if data['meta_tags']
15
17
  site_meta_tags = data['meta_tags'].with_indifferent_access
16
18
  @meta_tags.merge!(site_meta_tags)
@@ -34,8 +36,12 @@ module Middleman
34
36
  html = []
35
37
  @meta_tags[:title] = full_title(@meta_tags[:title])
36
38
  html.push content_tag(:title, @meta_tags[:title])
39
+ if @meta_tags[:canonical]
40
+ html.push tag(:link, rel: 'canonical', href: current_page.url)
41
+ end
42
+
37
43
 
38
- excluded_keys = %w(site_name separator title image)
44
+ excluded_keys = %w(site_name separator title image canonical)
39
45
  meta_hash = @meta_tags.reject { |k| excluded_keys.include?(k) }.merge(
40
46
  og: meta_open_graph,
41
47
  twitter: meta_twitter
@@ -1,5 +1,5 @@
1
1
  module Middleman
2
2
  module Metaman
3
- VERSION = '0.1.6'.freeze
3
+ VERSION = '0.1.7'.freeze
4
4
  end
5
5
  end
@@ -6,7 +6,6 @@ require 'middleman-metaman/version'
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "middleman-metaman"
8
8
  s.version = Middleman::Metaman::VERSION
9
- s.platform = Gem::Platform::RUBY
10
9
  s.authors = ['Jarrett Lusso']
11
10
  s.email = ['jarrett@cacheventures.com']
12
11
  s.homepage = 'https://github.com/cacheventures/middleman-metaman'
@@ -19,9 +18,5 @@ Gem::Specification.new do |s|
19
18
  s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
20
19
  s.require_paths = ["lib"]
21
20
 
22
- # The version of middleman-core your extension depends on
23
- s.add_runtime_dependency("middleman-core", [">= 4.2.1"])
24
-
25
- # Additional dependencies
26
- # s.add_runtime_dependency("gem-name", "gem-version")
21
+ s.add_runtime_dependency('middleman-core', ['>= 4.2.1'])
27
22
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: middleman-metaman
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6
4
+ version: 0.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jarrett Lusso