middleman-metaman 0.1.6 → 0.1.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/middleman-metaman/helpers.rb +7 -1
- data/lib/middleman-metaman/version.rb +1 -1
- data/middleman-metaman.gemspec +1 -6
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 98e03a793f507415717468c59cf3697d59726ecce9e50773338197e92272a510
|
|
4
|
+
data.tar.gz: 7df61a29a163ff54f711f0208b1364315c16d47d00d1b12bfe6a0f0b9764df8f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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
|
data/middleman-metaman.gemspec
CHANGED
|
@@ -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
|
-
|
|
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
|