middleman-meta-tags 0.6.0 → 0.7.0

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: ef14ab4f61e2d7198851cc0808879c8c3430a9bcdc2859da4ce1a0f1f013cdd4
4
- data.tar.gz: e8f9404f1345214f339ca1c4c67c707fa5a2d8cdbae6e046b9d2ec3151c73685
3
+ metadata.gz: 4136f9598fca0724748c1db041a36bbd41f57e734abe96ded4e2c2595e9765c2
4
+ data.tar.gz: 9cd54689e62522011bdb968b8e140f365310c1475ce25d4a39a9b71c88b9f874
5
5
  SHA512:
6
- metadata.gz: e288243971af0448eb3da675e580a1c5eb27621518c5d38f3823dca6780cfa2463cb508761d960ff4c6b1204df7e01d72b9eaf6691a5b392ea8cea9b3c7dc1bf
7
- data.tar.gz: 3bfdfb8894575caf3f8530c096355d72e24e24e59d9da63f26e36e9deb2385ed191fa4104c8bcdbf7d4e9decf359b515c9cfc1ad7418aa9e2198d8827913f957
6
+ metadata.gz: 289ab13ebc08cfef692870033b05efb9adc7ccda75f3904409f46f0285e96ea4f60bd5cca6a6b0c540f7103e214f895e4af4f91525990267e8c5c8b5d61e40a5
7
+ data.tar.gz: ea93d7c51a5a40d0ea1d94c6a1e740ef3a1d2f4ffdb8b39cacec8d067632252166be86ac1eb0ea7fde1f2e480b836d988a935d1b644124f0394501e06e703e04
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## 0.7.0 (13/11/21)
2
+
3
+ * Add middleman 4.4 support
4
+
1
5
  ## 0.6.0 (11/03/20)
2
6
 
3
7
  * Allow viewport to be customized
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # Middleman MetaTags
1
+ # Middleman MetaTags [![Ruby](https://github.com/tiste/middleman-meta-tags/actions/workflows/ruby.yml/badge.svg)](https://github.com/tiste/middleman-meta-tags/actions/workflows/ruby.yml)
2
2
 
3
3
  SEO gem for your Middleman apps.
4
4
 
@@ -87,14 +87,14 @@ Then it looks the page meta data to attempt to display the following keys:
87
87
  - MM `twitter_card` (defaults to `summary_large_image`) => META `twitter:card`
88
88
  - MM `twitter_author` => META `twitter:creator`
89
89
  - MM `description` => META `twitter:description`
90
- - MM `pull_image` => META `twitter:image:src`
90
+ - MM `thumbnail` => META `twitter:image:src`
91
91
  - MM `publisher_twitter` => META `twitter:site`
92
92
  - MM `title` => META `twitter:title`
93
93
  - MM `description` => META `og:description`
94
- - MM `pull_image` => META `og:image`
94
+ - MM `thumbnail` => META `og:image`
95
95
  - MM `site` => META `og:site_name`
96
96
  - MM `title` => META `og:title`
97
- - MM `host` => optional attribute for composing `pull_image` src with asset helper
97
+ - MM `host` => optional attribute for composing `thumbnail` src with asset helper
98
98
 
99
99
  In addition, if you want to customize meta tags by each page's frontmatter, you
100
100
  can add `customize_by_frontmatter: true` in `data/site.yml`. The priority would
@@ -116,10 +116,10 @@ And add it to the layouts and views that you need.
116
116
 
117
117
  ### Pull images
118
118
 
119
- For the `pull_image` to render for twitter metatags, a full url must be used:
119
+ For the `thumbnail` to render for twitter metatags, a full url must be used:
120
120
 
121
121
  ```
122
- pull_image: 'http://example.com/path/to/image.jpg'
122
+ thumbnail: 'http://example.com/path/to/image.jpg'
123
123
  ```
124
124
 
125
125
  If pointing to an image in your Middleman source, you can instead specify the
@@ -133,7 +133,7 @@ metatags.
133
133
  host: http://example.com
134
134
 
135
135
  # your article
136
- pull_image 'page/to/image/jpg'
136
+ thumbnail 'page/to/image/jpg'
137
137
  ```
138
138
 
139
139
  ## Contributing
@@ -1,3 +1,5 @@
1
+ require "active_support/core_ext/hash/indifferent_access"
2
+
1
3
  module Middleman
2
4
  module MetaTags
3
5
  module Helpers
@@ -1,5 +1,5 @@
1
1
  module Middleman
2
2
  module MetaTags
3
- VERSION = '0.6.0'
3
+ VERSION = '0.7.0'
4
4
  end
5
5
  end
@@ -1,5 +1,7 @@
1
1
  require 'spec_helper'
2
2
 
3
+ require 'middleman-core/core_extensions/data'
4
+
3
5
  describe Middleman::MetaTags::Helpers do
4
6
  let(:h) { Class.new { extend Middleman::MetaTags::Helpers } }
5
7
 
@@ -86,4 +88,31 @@ describe Middleman::MetaTags::Helpers do
86
88
  ).to be_nil
87
89
  end
88
90
  end
91
+
92
+ describe "site_data" do
93
+ before do
94
+ app = :app
95
+ data_store = Middleman::CoreExtensions::Data::DataStore.new(
96
+ app,
97
+ Middleman::CoreExtensions::Data::DATA_FILE_MATCHER
98
+ )
99
+ data_store.store(
100
+ :site,
101
+ {
102
+ :host => "https://middlemanapp.com/",
103
+ :site => "Middleman",
104
+ }
105
+ )
106
+ allow(h).to receive(:data).and_return(data_store)
107
+ end
108
+
109
+ it "returns a HashWithIndifferentAccess" do
110
+ expect(h.site_data).to be_a(ActiveSupport::HashWithIndifferentAccess)
111
+ end
112
+
113
+ it "returns data from the :site key" do
114
+ expect(h.site_data['site']).to eq("Middleman")
115
+ expect(h.site_data[:site]).to eq("Middleman")
116
+ end
117
+ end
89
118
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: middleman-meta-tags
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Baptiste Lecocq
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-11-03 00:00:00.000000000 Z
11
+ date: 2021-09-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: middleman-core