middleman-dato 0.5.17 → 0.5.18

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ed184400d9101ac6c8134233d09301e542e4ceee
4
- data.tar.gz: 4af9ab976d777ab6206ad2db4c26ee27d4f735ba
3
+ metadata.gz: 6c9aa27419fc21cf5a2fc1c2fd23a3ed73b7c560
4
+ data.tar.gz: 28d3a915f59f2b3676d7fbf259a2c61478356639
5
5
  SHA512:
6
- metadata.gz: 7b04769408e1ab40e01c6b41bc197ad03b8e0972c7ec95b49477ca99ada58532fa9548ac5dd67584eef904ace6e1ec4dd64b88179c0e75ef8f63c7311328ca5f
7
- data.tar.gz: 4d75c15a402f2e8dfc71951707776a3c600db383918b8c8de80362f3e2e536682e9be13a8faffd0e4aeaf22a9bb272a553fc101fe01ae7a63e1bdc3e742a9cfc
6
+ metadata.gz: 79cfd580f4f5fe561e4bb9474535ec871cd5f36966d789bbccaa264531f34f23a67461112f08c1b7a980a8b78626d2633c8d58db1eeb0e40f01f67577f3d34a0
7
+ data.tar.gz: f98a853cbec30c3af95f1e0d84509c687bd7c1c45d26ec23348aa78fee8379fa70794d9e359a97cfa48eb3bdd73ae6954c68d38d40b2b050e4c12cecdc3bdeec
data/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  [![Build Status](https://travis-ci.org/datocms/middleman-dato.svg?branch=master)](https://travis-ci.org/datocms/middleman-dato)
4
4
 
5
- Middleman Dato is a Middleman extension to use the Middleman static site generator together with the API-driven DatoCMS, a fully customizable administrative backend for your static websites.
5
+ Middleman Dato is a Middleman extension to use the Middleman static site generator together with the API-driven DatoCMS, a fully customizable administrative backend for your static websites.
6
6
 
7
7
  This gem works for Middleman v3 and v4.
8
8
 
@@ -10,6 +10,12 @@ This gem works for Middleman v3 and v4.
10
10
 
11
11
  To learn more about DatoCMS and how you can use it with your Middleman website, head over to [our documentation](http://www.datocms.com/docs/) and [video tutorials](http://www.datocms.com/docs/tutorials/middleman_netlify/).
12
12
 
13
+ ## Example website
14
+
15
+ We've prepared a [Middleman example website](https://github.com/datocms/middleman-example) integrated with DatoCMS. The site is deployed on Netlify, and can be seen at this URL:
16
+
17
+ https://datocms-middleman-example.netlify.com/
18
+
13
19
  ## Setup
14
20
 
15
21
  ```ruby
@@ -30,11 +36,11 @@ activate :dato,
30
36
 
31
37
  ### `dato`
32
38
 
33
- Using this helper you can access to any item stored in your site by item type.
34
- That is, if your site has an Item Type with `article` as API identifier, you can get
35
- the complete array of items with `dato.articles` (yep, the identifier pluralized).
39
+ Using this helper you can access to any item stored in your site by item type.
40
+ That is, if your site has an Item Type with `article` as API identifier, you can get
41
+ the complete array of items with `dato.articles` (yep, the identifier pluralized).
36
42
 
37
- If a Item Type is marked as Singleton (ie. `about_page`) you don't need to pluralize and
43
+ If a Item Type is marked as Singleton (ie. `about_page`) you don't need to pluralize and
38
44
  a call to `dato.about_page` directly returns the Item (or `nil`, if still hasn't been created
39
45
  within the backend).
40
46
 
@@ -56,17 +62,19 @@ You can use this helper within Middleman `config.rb`, as well as within your vie
56
62
  <% end %>
57
63
  ```
58
64
 
59
- Complex field types (ie. images, files, videos, SEO settings, etc.) implement specific methods
60
- you can use as well:
65
+ ### Managing images and files
66
+
67
+ Every DatoCMS plan comes with the power of Imgix image processing. Imgix makes
68
+ image processing easy by allowing you to resize, crop, rotate, style, watermark
69
+ images and more easily on-the-fly:
61
70
 
62
71
  ```ruby
63
72
  article = dato.articles.first
64
-
65
- article.cover_image.file.width(500).fit('crop').to_url
66
- article.video.iframe_embed(800, 600)
73
+ article.cover_image.url(w: 200, h: 200, fit: 'crop', fm: 'jpg')
67
74
  ```
68
75
 
69
- Please [refer to the code](https://github.com/datocms/middleman-dato/tree/master/lib/middleman_dato/field_type) for more informations.
76
+ To know all the parameters you can pass to the `.url()` method, please take
77
+ a look at the [Imgix Image URL API reference](https://docs.imgix.com/apis/url).
70
78
 
71
79
  ### `dato_meta_tags`
72
80
 
@@ -106,6 +114,14 @@ This helper generates meta tags based on the Favicon image specified within the
106
114
  <%= dato_favicon_meta_tags(theme_color: '#D97C5F') %>
107
115
  ```
108
116
 
117
+ ## Disable reload of data at every request
118
+
119
+ During the development of the website it might be useful to speed up the feedback cycle disabling the automatic reload of DatoCMS data at every page refresh:
120
+
121
+ ```
122
+ DISABLE_DATO_REFRESH=1 bundle exec middleman
123
+ ```
124
+
109
125
  ## Submitting a Pull Request
110
126
 
111
127
  1. Fork it.
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module MiddlemanDato
3
- VERSION = '0.5.17'
3
+ VERSION = '0.5.18'
4
4
  end
@@ -21,7 +21,7 @@ Gem::Specification.new do |s|
21
21
  s.require_paths = ['lib']
22
22
 
23
23
  s.add_runtime_dependency('middleman-core', ['>= 3.3.12'])
24
- s.add_runtime_dependency('dato', ['>= 0.1.6'])
24
+ s.add_runtime_dependency('dato', ['>= 0.1.11'])
25
25
  s.add_runtime_dependency('semantic')
26
26
  s.add_runtime_dependency('activesupport')
27
27
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: middleman-dato
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.17
4
+ version: 0.5.18
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stefano Verna
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-08-23 00:00:00.000000000 Z
11
+ date: 2016-09-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: middleman-core
@@ -30,14 +30,14 @@ dependencies:
30
30
  requirements:
31
31
  - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: 0.1.6
33
+ version: 0.1.11
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - ">="
39
39
  - !ruby/object:Gem::Version
40
- version: 0.1.6
40
+ version: 0.1.11
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: semantic
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -138,4 +138,3 @@ test_files:
138
138
  - spec/middleman_dato/meta_tags/og_locale_spec.rb
139
139
  - spec/spec_helper.rb
140
140
  - spec/support/mock_builder.rb
141
- has_rdoc: